| Package it; as a container or as containers that install a RPM/DEB/APK/Condapkg/Pythonpkg (possibly containing a zipapp). Zipapps are fast. If you have any non-python dependencies, a Pythonpkg only solves for part of the packaging needs. Producing a packaged artifact should be easy and part of your CI build script. Here's the cookiecutter-django production docker-compose.yml with containers for django, celery, postgres, redis, and traefik as a load balancer:
https://github.com/pydanny/cookiecutter-django/blob/master/%... Cookiecutter-django also includes a Procfile. With k8s, you have an ingress (~load balancer + SSL termination proxy) other than traefik. You can generate k8s YML from docker-compose.yml with Kompose. I just found this which describes using GitLab CI with Helm:
https://davidmburke.com/2020/01/24/deploy-django-with-helm-t... What is the command to scale up or down? Do you need a geodistributed setup (on multiple providers' clouds)? Who has those credentials and experience? How do you do red/green or rolling deployments? Can you run tests in a copy of production? Can you deploy when the tests that run on git commit pass? What runs the database migrations in production; while users are using the site? If something deletes the whole production setup or the bus factor is 1, how long does it take to redeploy from zero; and how much manual work does it take? CI + Ansible + Terraform + Kubernetes. Whatever tools you settle on, django-eviron for a 12 Factor App may be advisable.
https://github.com/joke2k/django-environ The Twelve-Factor App:
https://12factor.net/ |