Fix Compose deploy: hardened pull-based compose.yaml - #28
Merged
Conversation
Adopt the canonical single compose.yaml filename (shipping both it and docker-compose.yml triggers a "multiple config files" warning) and harden it: - pull the published GHCR image (lowercase owner) instead of building; keep a documented build-from-source option - add init: true for signal forwarding / zombie reaping on graceful shutdown - add a healthcheck using Node's built-in fetch (alpine has no curl/wget), in exec/list form so the "://" and colon-space in the script aren't misread by YAML as a mapping - keep named volume, restart: unless-stopped, quoted port; no obsolete version: - document that compose auto-reads a sibling .env Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ship a documented template of the real runtime knobs (NODE_ENV, TRUST_PROXY, PORT). Compose auto-reads a sibling .env; real .env files stay gitignored. Notes that the admin password is set in-app at first sign-in, not via env. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Deploy by curling compose.yaml (+ .env.example) onto the server; no source checkout needed since compose pulls the published image - Document the "(healthy)" check, first-sign-in password, and TRUST_PROXY via .env - Update all docker-compose.yml references and project-layout listing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The deployed
docker-compose.ymlfailed with "can't find image" / config errors on Dockge/Portainer. The published image itself is fine —ghcr.io/authortom/simhub:latestis public and anonymously pullable (verified against the GHCR API). The usual server-side causes are a wrong-case owner (authorTomvs GHCR's forced-lowercaseauthortom) or a straybuild:with no source tree present.Changes
feat: replacedocker-compose.ymlwith hardenedcompose.yaml— canonical single filename (avoids the "multiple config files" warning); pulls the published GHCR image (lowercase owner) with a documented build-from-source option; addsinit: truefor signal forwarding / zombie reaping; adds a healthcheck using Node's built-infetch(alpine has no curl/wget) in exec/list form so the://and colon-space in the script aren't misread by YAML as a mapping; keeps named volume,restart: unless-stopped, quoted port; no obsoleteversion:.chore: add tracked.env.example— real runtime knobs (NODE_ENV,TRUST_PROXY,PORT); compose auto-reads a sibling.env; real.envstays gitignored. Notes the admin password is set in-app at first sign-in, not via env.docs: pull-based deploy steps — curlcompose.yaml(+.env.example) onto the server,docker compose up -d, confirm(healthy); update alldocker-compose.ymlreferences.Validation
docker compose configpassesversion:key🤖 Generated with Claude Code