Skip to content

feat(docker): full self-hosted Compose support#43

Merged
offendingcommit merged 1 commit into
mainfrom
feat/docker-compose-support
May 28, 2026
Merged

feat(docker): full self-hosted Compose support#43
offendingcommit merged 1 commit into
mainfrom
feat/docker-compose-support

Conversation

@offendingcommit
Copy link
Copy Markdown
Owner

Closes #21 (and #31). Builds on the Dockerfile from #23 to make the web image drop-in for a Honcho docker-compose stack.

What's added

  • Same-origin reverse proxy — nginx proxies /v3 and /health to $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.
  • Runtime config — an entrypoint writes config.js from OPENCONCHO_DEFAULT_HONCHO_URL at 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.yml example service to drop into a Honcho stack.
  • GHCR publish workflow — multi-arch (amd64+arm64) image on release → ghcr.io/offendingcommit/openconcho-web.
  • nginx.conf → envsubst template; docs/docker.md rewritten.

Verification

  • make check green (added runtime-config unit tests; config seeding is additive).
  • Image built + smoke-tested: nginx starts despite an unresolvable upstream; /healthz=ok; SPA fallback 200; config.js correctly injects same-origin (default) and an absolute override; rendered nginx conf contains the ^~ /v3/ proxy.

Note

Runtime config.js is written into the web root at start, so --read-only root blocks it — documented: bind-mount config.js or set the URL in Settings under read-only.

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.
@offendingcommit offendingcommit merged commit 04104d1 into main May 28, 2026
2 checks passed
@offendingcommit offendingcommit deleted the feat/docker-compose-support branch May 28, 2026 22:11
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.

Add Docker packaging for self-hosted Compose stacks

1 participant