Skip to content

ci: GHCR deploy pipeline, production compose, Docker smoke tests#52

Open
mriechers wants to merge 1 commit intomainfrom
dev
Open

ci: GHCR deploy pipeline, production compose, Docker smoke tests#52
mriechers wants to merge 1 commit intomainfrom
dev

Conversation

@mriechers
Copy link
Owner

Summary

  • deploy.yml: Replace placeholder with full GHCR build+push workflow (api, web, worker images tagged with SHA + latest)
  • docker-compose.prod.yml: Production compose file pulling from GHCR with Watchtower auto-updates (label-based opt-in)
  • ci.yml: Add Docker build smoke test job to catch Dockerfile issues before merge

Details

Deploy workflow builds and pushes 3 images to ghcr.io/mriechers/cardigan-{api,web,worker} on merge to main. Uses deploy-specific GHA cache scopes to avoid collisions with CI cache.

Production compose mirrors the dev compose but uses image: instead of build:. Watchtower polls GHCR every 5 minutes and only updates containers labeled watchtower.enable=true (api, web, worker — not tunnel or third-party images).

Docker smoke test builds all 3 Dockerfiles with push: false on PRs to main and pushes to dev, ensuring Dockerfile changes don't break the build.

Test plan

  • CI passes (lint, test, build, migration, Docker smoke test)
  • deploy.yml YAML is valid
  • docker-compose.prod.yml validates: docker compose -f docker-compose.prod.yml config
  • Watchtower label opt-in correctly scoped to GHCR services only

🤖 Generated with Claude Code

- Replace deploy.yml placeholder with GHCR build+push workflow
- Create docker-compose.prod.yml with Watchtower auto-updates
- Add Docker build smoke test to CI pipeline
- Watchtower uses label-based opt-in (only GHCR-managed services)

[Agent: Main Assistant]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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