Skip to content

ci: publish Docker images to GHCR on main and releases#83

Open
SirKitboard wants to merge 3 commits into
Anyesh:mainfrom
SirKitboard:pr/ghcr-publish
Open

ci: publish Docker images to GHCR on main and releases#83
SirKitboard wants to merge 3 commits into
Anyesh:mainfrom
SirKitboard:pr/ghcr-publish

Conversation

@SirKitboard
Copy link
Copy Markdown

@SirKitboard SirKitboard commented May 17, 2026

Motivation

When deploying wardrowbe on a NAS or home server (e.g. Unraid) using Docker Compose, the current setup requires a full Docker build on the deployment machine. This means the server needs build tooling, all source dependencies, and enough CPU/RAM to compile the images — not something you want on a NAS that's just meant to run containers.

Publishing pre-built images to GHCR means deployments become a simple docker compose pull && docker compose up -d, with no build step needed on the host.

Summary

  • Add .github/workflows/docker-publish.yml that builds and pushes wardrowbe-backend and wardrowbe-frontend images to GitHub Container Registry on every push to main and on published releases
  • Images are tagged service-latest and service-<sha>, with the registry path derived dynamically from GITHUB_REPOSITORY
  • Builds for both linux/amd64 and linux/arm64 for Raspberry Pi compatibility
  • Update docker-compose.yml and docker-compose.prod.yml to pull pre-built images from GHCR instead of building locally
  • Scope GHA layer cache in ci.yml so the existing docker-build job and the new publish workflow don't collide

Notes

  • worker reuses the backend image with a different entrypoint command, consistent with the existing Dockerfile structure
  • The dev compose (docker-compose.dev.yml) is unchanged — frontend still builds from Dockerfile.dev and backend/worker mount local code for hot-reload
  • No additional secrets needed — only the default GITHUB_TOKEN with packages: write permission

Test plan

  • Push to main and confirm both images appear under Packages on the repo page
  • On a fresh machine, confirm docker compose pull && docker compose up -d works without a local build step

Add a docker-publish workflow that builds and pushes backend and
frontend images to GitHub Container Registry on every push to main
and on published releases. Images are tagged with `latest`, semver
(on release), and a short SHA.

Update docker-compose.yml and docker-compose.prod.yml to pull
pre-built images from GHCR instead of building locally, so
deployments (e.g. Unraid) only need docker compose pull + up.

The dev compose is unchanged — frontend still builds from
Dockerfile.dev and backend/worker mount local code for hot-reload.

Scope the GHA layer cache in ci.yml so the CI docker-build job and
the publish workflow share cache keys without colliding.
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