Skip to content

Add script for generating compose files#56

Open
tomnieuwland wants to merge 1 commit into
haydenbleasel:mainfrom
tomnieuwland:add-generate-compose-script
Open

Add script for generating compose files#56
tomnieuwland wants to merge 1 commit into
haydenbleasel:mainfrom
tomnieuwland:add-generate-compose-script

Conversation

@tomnieuwland

@tomnieuwland tomnieuwland commented May 10, 2026

Copy link
Copy Markdown

Description

While working on #55 I needed a quick and dirty way for checking that the docker compose files that were being created were valid, and could be used for provisioning, without actually needing all the various environment variables and services that the project depends on. I assume that as long as a game.buildCompose creates a valid compose file, the rest of the provisioning will "just work"

Below is an example output

$ bun run scripts/generate-compose.ts minecraft
services:
  minecraft:
    image: itzg/minecraft-server:latest
    container_name: ghost-game
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      SERVER_NAME: "Minecraft Local"
      MOTD: "Minecraft Local - Powered by Ghost"
      DIFFICULTY: "normal"
      MODE: "survival"
      MEMORY: "6G"
      TZ: "UTC"
      ENABLE_RCON: "true"
      RCON_PASSWORD: "de4e68de197c5dbea93e4b737a1313ec"
      OVERRIDE_SERVER_PROPERTIES: "true"
      ENABLE_COMMAND_BLOCK: "true"
      SPAWN_PROTECTION: "0"
      MAX_PLAYERS: "20"
      ALLOW_NETHER: "true"
      ONLINE_MODE: "true"
      PVP: "true"
      VIEW_DISTANCE: "10"
    volumes:
      - /var/lib/ghost/game/data:/data
    restart: unless-stopped

I was unable to get some tests passing locally due to missing environment variables. These tests also fail on forked versions of main.

Related Issues

N/A

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation, if necessary.
  • I have added tests that prove my fix is effective or my feature works.
  • New and existing tests pass locally with my changes.

Screenshots (if applicable)

N/A

Additional Notes

N/A

@vercel

vercel Bot commented May 10, 2026

Copy link
Copy Markdown

@tomnieuwland is attempting to deploy a commit to the Hayden Bleasel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant