Skip to content

Multi-arch GHCR CI/CD + split dev/prod docker compose (no edge Caddy)#10

Merged
d3mocide merged 2 commits into
mainfrom
claude/docker-cicd-setup-az0tkk
Jul 10, 2026
Merged

Multi-arch GHCR CI/CD + split dev/prod docker compose (no edge Caddy)#10
d3mocide merged 2 commits into
mainfrom
claude/docker-cicd-setup-az0tkk

Conversation

@d3mocide

@d3mocide d3mocide commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/docker-publish.yml: builds frontend/api/dxspider-bridge for linux/amd64 + linux/arm64 (buildx + QEMU) and pushes to GHCR on push to main (tag latest) and version tags vX.Y.Z. PRs get an amd64-only build-check with no push, to catch broken Dockerfiles before merge.
  • Add docker-compose.prod.yml: standalone production stack that runs the published GHCR images — no source checkout or build tooling needed on the VPS. docker-compose.yml remains the build-from-source dev stack.
  • No dedicated edge Caddy container. It only ever did two things: TLS/ACME and routing /api + /data to the right container. TLS is redundant when a host-level reverse proxy already terminates HTTPS in front, so that job goes away; the routing job moves into frontend's own Caddy instance (it was already running a Caddy process to serve the static PWA). This also matches DESIGN.md §10's service list, which never listed a separate caddy entry. frontend binds to 127.0.0.1:$SKYWAVE_PORT (default 8080) in prod for an external reverse proxy to target; dev keeps the plain :80 publish.
  • Add .env.example documenting DXSPIDER_LOGIN, DXSPIDER_NODES, SKYWAVE_PORT, GHCR_OWNER, IMAGE_TAG.
  • Add per-service .dockerignore (frontend/backend/dxspider-bridge) to keep build contexts small.
  • Add make prod-up / prod-down / prod-pull / prod-logs / prod-ps targets.
  • Document production deployment (including example host-level Caddy/nginx snippets) and the GHCR publish flow in README.md, plus the one-time step to make GHCR packages public after the first publish.

Test plan

  • docker compose config validates both docker-compose.yml and docker-compose.prod.yml
  • docker-compose.prod.yml fails fast with a clear message when DXSPIDER_LOGIN is unset
  • Verified Caddyfile handle/handle_path block structure against the pre-existing (working) root Caddyfile it was merged from
  • First real run of the publish workflow on merge to main (nothing to push to GHCR until this lands)
  • End-to-end docker-compose.prod.yml run against published images behind a real host-level reverse proxy on a VPS

claude added 2 commits July 10, 2026 18:39
- .github/workflows/docker-publish.yml builds frontend/api/dxspider-bridge
  for linux/amd64+arm64 via buildx+QEMU, pushing to GHCR on main/tags
  (PRs get an amd64-only build-check, no push)
- docker-compose.prod.yml runs the published images (no build/source
  needed on the VPS); docker-compose.yml stays the build-from-source dev
  stack
- Caddyfile's site address is now env-driven (SITE_ADDRESS, defaults to
  plain :80) so prod TLS is a .env change, not a tracked-file edit
- .env.example documents DXSPIDER_LOGIN/SITE_ADDRESS/GHCR_OWNER/IMAGE_TAG
- .dockerignore per service, Makefile prod-* targets, README deployment docs
The edge Caddy's only real jobs were TLS/ACME (redundant when a host-level
reverse proxy already terminates TLS) and routing /api + /data to the
right container — the latter now lives in frontend's own Caddy instance,
which was already running a Caddy process anyway. Cuts a container/image
and matches DESIGN.md's §10 service list, which never listed a separate
caddy entry.

frontend now binds to 127.0.0.1:$SKYWAVE_PORT in prod (default 8080) for
an external reverse proxy to target; dev keeps the plain :80 publish.
@d3mocide d3mocide changed the title Multi-arch GHCR CI/CD + split dev/prod docker compose Multi-arch GHCR CI/CD + split dev/prod docker compose (no edge Caddy) Jul 10, 2026
@d3mocide
d3mocide marked this pull request as ready for review July 10, 2026 19:16
@d3mocide
d3mocide merged commit bba1032 into main Jul 10, 2026
3 checks passed
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.

2 participants