Skip to main content

Production Environment

The production environment serves live traffic at app.the-shift.dev.

Details

PropertyValue
URLapp.the-shift.dev
Branchmain
Replicas2
Namespaceshift-platform
GCP Projectplatform-489018
Regionus-central1
ClusterGKE shift-platform
Artifact Registryus-central1-docker.pkg.dev/platform-489018/shift-platform/platform
StorageConvex (self-hosted, in-cluster)

Deployment

Pushing to the main branch triggers an automatic production deployment via GitHub Actions:

git push origin main

The CI/CD pipeline executes:

  1. Lint -- bun run check
  2. Test -- bun run test
  3. Docker Build -- Multi-stage build
  4. Push -- Image pushed to GCP Artifact Registry with sha-<commit> and latest tags
  5. Deploy -- kubectl apply -k k8s/overlays/prod/ followed by a rollout restart

Verifying

After a deploy, verify the production environment:

curl https://app.the-shift.dev/healthz
# {"status":"ok","service":"shift-gateway"}

# Check aggregated service health
curl https://app.the-shift.dev/api/v1/health

Kustomize Overlay

The production overlay (k8s/overlays/prod/) configures:

  • 2 replicas for high availability
  • NODE_ENV=production
  • Production hostname (app.the-shift.dev) in the Ingress
  • Production namespace (shift-platform)
  • Production resource requests and limits

Rollback

To roll back to a previous version, you can:

  1. Revert the commit on main and push, triggering a new deploy
  2. Manually set the image tag to a previous sha-<commit>:
kubectl set image deployment/shift-gateway \
shift-gateway=us-central1-docker.pkg.dev/platform-489018/shift-platform/platform:sha-<previous-commit> \
-n shift-platform

Monitoring

Check pod status and logs:

kubectl get pods -n shift-platform
kubectl logs -f deployment/shift-gateway -n shift-platform

Check the health endpoint for all services:

curl https://app.the-shift.dev/api/v1/health