Skip to content

Deployment

MealPal uses blue-green deployments via Traefik on a single t4g.micro EC2 instance.

Terminal window
./deploy.sh # Full zero-downtime deploy
./deploy.sh migrate # Run Alembic migrations
./deploy.sh logs # View container logs
./deploy.sh status # Check service status
  1. Pull latest code from GitHub
  2. Build new Docker image
  3. Start new container (blue or green) alongside the old one
  4. Health check the new container
  5. Update Traefik labels to route traffic to the new container
  6. Drain connections from the old container
  7. Stop the old container

The --no-recreate flag is critical to prevent Traefik from dropping connections during the switch.

ServiceResourceRegion
ComputeEC2 t4g.micro (ARM)ca-central-1
DatabaseRDS PostgreSQL (db.t4g.micro)ca-central-1
StorageS3ca-central-1
FrontendAmplifyca-central-1
CacheValkey (in Docker)ca-central-1

Running at approximately $35-38/month total AWS spend.