-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Goal
Build a GitHub Actions CI/CD workflow to test, build a Docker image, and deploy to the Hetzner VPS on every push to main, with health checks and automatic rollback on failure.
Requirements
Functional
- Test job: Run
pytest,ruff, andblack --checkon every push. - Build job: Build Docker image tagged with commit SHA; push to registry.
- Deploy job: SSH to Hetzner VPS, pull new image, restart services via Docker Compose.
- Health check: Verify
GET /healthreturns 200 within 30 seconds post-deploy. - Rollback: Revert to previous image if health check fails; send alert.
Technical
- Workflow file:
.github/workflows/deploy.yml. - Secrets:
DOCKER_USERNAME,DOCKER_PASSWORD,DOCKER_REGISTRY,HETZNER_SSH_KEY,HETZNER_HOST. - Registry: Docker Hub or private registry.
Acceptance Criteria
- Push to
maintriggers full test → build → deploy pipeline. - Failed tests block deployment.
- Health check passes after successful deployment.
- Failed health check triggers rollback to previous image.
Dependencies
- Blocked by: Issue 28: Hetzner VPS Deployment Setup #28.
- Blocks: Nothing.
Reactions are currently unavailable