-
Notifications
You must be signed in to change notification settings - Fork 23
Manual Production Deployments
Richard Salas edited this page Jan 24, 2026
·
2 revisions
This page outlines the procedure for deploying code to a production environment. Follow these steps to ensure the latest code is merged, built into container images, pushed to ECR, and deployed via Kubernetes.
- Purpose
- Steps Overview
- Step 1: Checkout Deployment Branch
- Step 2: Merge Main Branch Code
- Step 3: Push Updates to Remote Branch
- Step 4: Build and Push Images to ECR
- Step 5: Restart Kubernetes Deployments
- Validation
-
Synchronize Code: Ensure production deployment branch is updated with the latest
mainbranch changes. - Build and Publish Images: Generate Docker images for all services and push them to AWS ECR with proper tags.
- Trigger Rollout: Restart Kubernetes deployments to use the newly built images.
- Clone the repository and check out the deployment branch.
- Merge the latest
mainbranch into the deployment branch. - Push the updated branch to the remote repository.
- Build and push Docker images for backend, frontend, and provider-middleware to AWS ECR.
- Restart Kubernetes deployments to pick up the new images.
Clone the repository and switch to the deployment branch:
git clone <repo>
cd <repo>
git checkout <branch_name>
Reset the deployment branch to match the latest main branch:
git fetch origin
git reset --hard origin/main
Force push the updated branch to the remote repository:
git push origin <branch_name> --force
Login to docker ECR:
aws ecr get-login-password | docker login '239442854891.dkr.ecr.us-west-2.amazonaws.com' --username AWS --password-stdin
Use docker buildx to build and push images for all services to AWS ECR:
docker buildx build --platform linux/amd64 -t 239442854891.dkr.ecr.us-west-2.amazonaws.com/unlockedv2:<tagname> --push -f backend/Dockerfile .
docker buildx build --platform linux/amd64 -t 239442854891.dkr.ecr.us-west-2.amazonaws.com/frontend:<tagname> --push frontend/.
docker buildx build --platform linux/amd64 -t 239442854891.dkr.ecr.us-west-2.amazonaws.com/provider_middleware:<tagname> --push -f provider-middleware/Dockerfile .
Restart the Kubernetes deployments to apply the new images:
kubectl rollout restart deployment server
kubectl rollout restart deployment frontend
kubectl rollout restart deployment provider-service
- Run
kubectl get podsand confirm that all pods are restarted with the new image tags. - Verify production endpoints respond correctly with the updated deployment.