Skip to content

Template Repo for a django, guncorn, nginx, docker, k8s, digitalocean, github-actions CI/CD pipeline

Notifications You must be signed in to change notification settings

PeterKahenya/tawi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Steps

  1. Test
python manage.py test
  1. Build tawi_server
docker build -t registry.digitalocean.com/tawi-container-registry/tawi_server:latest nginx/
  1. Build tawi_api
docker build -t registry.digitalocean.com/tawi-container-registry/tawi_api:latest api/
  1. Push tawi_api image to registry
docker push registry.digitalocean.com/tawi-container-registry/tawi_api --all-tags
  1. Push tawi_server image to registry
docker push registry.digitalocean.com/tawi-container-registry/tawi_server --all-tags
  1. Update secrets
kubectl delete secrets tawi-prod-env-secrets
kubectl create secret generic tawi-prod-env-secrets --from-env-file ./.env.prod
  1. Apply all deployments and services
kubectl apply -f k8s/tawi_api.yaml 
kubectl apply -f k8s/tawi_server.yaml 
  1. Rollout and Monitor Deployments
kubectl rollout restart deployment/tawi-api-deployment
kubectl rollout status deployment/tawi-api-deployment

kubectl rollout restart deployment/tawi-server-deployment

kubectl rollout status deployment/tawi-server-deployment

-- also check

kubectl get pods

and

kubectl set image deployment/tawi-api-deployment tawi-api=registry.digitalocean.com/tawi-container-registry/tawi_api:${GITHUB_SHA::7}
kubectl set image deployment/tawi-server-deployment tawi-server=registry.digitalocean.com/tawi-container-registry/tawi_server:${GITHUB_SHA::7}

Github Actions Docs

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

About

Template Repo for a django, guncorn, nginx, docker, k8s, digitalocean, github-actions CI/CD pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published