V5 Frontend Deployment Guide
Quick Deploy to GKE​
Step 1: Build and Push Image​
# Set project
gcloud config set project serene-voltage-464305-n2
# Build and push to Artifact Registry
gcloud builds submit \
--config cloudbuild.yaml \
--project=serene-voltage-464305-n2
Step 2: Deploy to GKE​
# Get GKE credentials
gcloud container clusters get-credentials codi-poc-e2-cluster \
--region=us-central1-a \
--project=serene-voltage-464305-n2
# Deploy frontend
kubectl apply -f k8s-frontend-deployment.yaml
# Watch rollout
kubectl rollout status deployment coditect-v5-frontend -n coditect-app
# Check pods
kubectl get pods -n coditect-app -l app=coditect-v5-frontend
Step 3: Update Ingress (Route Traffic)​
# Edit the existing ingress to add V5 frontend route
kubectl edit ingress coditect-production-ingress -n coditect-app
# Add this path to the ingress (under spec.rules[0].http.paths):
# - path: /
# pathType: Prefix
# backend:
# service:
# name: coditect-v5-frontend-service
# port:
# number: 80
Step 4: Verify Deployment​
# Check deployment status
kubectl get deployment coditect-v5-frontend -n coditect-app
# View logs
kubectl logs -n coditect-app -l app=coditect-v5-frontend --tail=50
# Test health endpoint
curl https://coditect.ai/health
Files Created​
Dockerfile- Multi-stage build (Node 20 + nginx)nginx.conf- Nginx configuration for SPA routingcloudbuild.yaml- Google Cloud Build configurationk8s-frontend-deployment.yaml- Kubernetes deployment + servicedeploy.md- This file
Environment Variables​
Production environment variables (set in Dockerfile):
VITE_API_URL=https://coditect.ai/api/v5VITE_THEIA_URL=https://coditect.ai/theiaVITE_LM_STUDIO_URL=http://localhost:1234
Rollback​
# Rollback to previous version
kubectl rollout undo deployment coditect-v5-frontend -n coditect-app
# Check rollout status
kubectl rollout status deployment coditect-v5-frontend -n coditect-app