Deployment
MealPal uses blue-green deployments via Traefik on a single t4g.micro EC2 instance.
How It Works
Section titled “How It Works”./deploy.sh # Full zero-downtime deploy./deploy.sh migrate # Run Alembic migrations./deploy.sh logs # View container logs./deploy.sh status # Check service statusDeploy Steps
Section titled “Deploy Steps”- Pull latest code from GitHub
- Build new Docker image
- Start new container (blue or green) alongside the old one
- Health check the new container
- Update Traefik labels to route traffic to the new container
- Drain connections from the old container
- Stop the old container
The --no-recreate flag is critical to prevent Traefik from dropping connections during the switch.
Infrastructure
Section titled “Infrastructure”| Service | Resource | Region |
|---|---|---|
| Compute | EC2 t4g.micro (ARM) | ca-central-1 |
| Database | RDS PostgreSQL (db.t4g.micro) | ca-central-1 |
| Storage | S3 | ca-central-1 |
| Frontend | Amplify | ca-central-1 |
| Cache | Valkey (in Docker) | ca-central-1 |
Running at approximately $35-38/month total AWS spend.