Create a complete CI/CD pipeline using GitHub Actions or GitLab CI that includes all stages from lint to staging deployment. Also include a docker-compose.yml for local development.
Requirements
- Pipeline with stages: lint, unit tests, multi-stage Docker build, push to registry, deploy to staging
- Optimized multi-stage Dockerfile (builder + runtime)
- docker-compose.yml for local development with hot-reload
- Secrets managed as CI environment variables (not hardcoded)
- Pipeline status notification (Slack, email, or similar)
Examples
Input:
Push to main branch with changes in src/
Output:
Pipeline executes: lint (ESLint/Flake8) → tests → build Docker image → push to ECR/GHCR → deploy to staging with health check
Accepted technologies
- GitHub Actions
- GitLab CI
- Docker + Docker Compose
- Terraform (optional for infra)
- Any language for the sample app