Skip to content

jc2/kubernetes

Repository files navigation

Installation

  • sudo apt-get install libpq-dev python-dev
  • pip install -r requirements.txt
  • Create .env file from .env.example

Run in local

  • python manage.py migrate
  • python manage.py runserver
  • celery -A django_web worker -l info
  • celery -A django_web beat

Build Docker

  • docker build -t juancamiloceron/django .
  • docker tag juancamiloceron/django:latest juancamiloceron/django:v1

Run in Docker Compose

  • docker-compose up [--detach] [--build]
  • docker-compose logs -f
  • docker-compose down

Run in Kubernetes

  • kubectl apply -f django_configmap.yml
  • kubectl create secret generic django-secret --from-env-file=django_secrets
  • kubectl describe secret django-secret
  • kubectl apply -f django_pvc.yml
  • kubectl apply -f django_api_deployment.yml
  • kubectl get deploy django-api
  • kubectl get pod
  • kubectl apply -f django_api_service.yml
  • kubectl get service django-api
  • kubectl get node -o wide
  • kubectl apply -f django_worker_deployment.yml
  • kubectl apply -f django_scheduler_deployment.yml
  • kubectl create configmap nginx-config --from-file=../config/nginx/default.conf

  • kubectl apply -f .
  • kubectl delete all --all --namespace=default

Test

TODO

BUGS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published