Django in Production with PEX
summary
Explains packaging a Django app into a single-file .pex that contains app code and all dependencies, requires a matching Python interpreter version, and removes the need for portable virtualenvs. Shows moving manage.py into a package as an entry-point manage.py, adding custom Django management commands for Gunicorn and Celery, building the .pex, deploying with a systemd service plus an environment file, and running maintenance shells. Includes a demo workflow, a deploy script, and a GitHub repo with zero-downtime AWS deploy examples.
AI-written summary · about
chapters (6)
- 0:00Start
- 2:48installing these packages in your virtual environment
- 9:54move it from the top level into one of your python packages
- 14:50pass in your settings as environment variables
- 15:10create an environment file
- 21:58review the multiple points of entry
related talks
29mCan packaging improve Django deployments?
30m"What Django Deployment is Really About"
28mPython Pants - A build system for large codebases with multiple dependencies
26mWhat Django Deployment is Really About
41mDjango Deployments Done Right
34mAn Intro to Docker for Djangonauts
36mPython Packaging from Init to Deploy
38mContainerless Django: Deploying without Docker
