feat(docker): full self-hosted Compose support#43
Merged
Conversation
Make the web image drop-in for a Honcho docker-compose stack:
- nginx reverse-proxies /v3 and /health to $HONCHO_UPSTREAM (variable +
Docker resolver so it starts even before the upstream resolves), giving
the SPA a same-origin path to Honcho with no browser CORS.
- Runtime config: an entrypoint writes config.js from
OPENCONCHO_DEFAULT_HONCHO_URL, so one prebuilt image targets any backend
("same-origin" | absolute URL | empty). SPA seeds a first-run default
instance from it (additive; no-op in dev/desktop).
- docker-compose.yml example service + GHCR multi-arch publish workflow on
release.
- nginx.conf -> envsubst template; docs rewritten.
Closes #21. Closes #31.
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.
Closes #21 (and #31). Builds on the Dockerfile from #23 to make the web image drop-in for a Honcho
docker-composestack.What's added
/v3and/healthto$HONCHO_UPSTREAM. Uses a variable + the Docker resolver so nginx starts even before the upstream resolves and re-resolves per request. The browser makes same-origin requests → no CORS, token never leaves the origin.config.jsfromOPENCONCHO_DEFAULT_HONCHO_URLat container start, so one prebuilt image targets any backend without a rebuild (same-origin| absolute URL | empty). The SPA seeds a first-run default instance from it — additive, no-op in dev/desktop.docker-compose.ymlexample service to drop into a Honcho stack.ghcr.io/offendingcommit/openconcho-web.nginx.conf→ envsubst template;docs/docker.mdrewritten.Verification
make checkgreen (addedruntime-configunit tests; config seeding is additive)./healthz=ok; SPA fallback 200;config.jscorrectly injectssame-origin(default) and an absolute override; rendered nginx conf contains the^~ /v3/proxy.Note
Runtime
config.jsis written into the web root at start, so--read-onlyroot blocks it — documented: bind-mountconfig.jsor set the URL in Settings under read-only.