{"repo":"leopard627/django-gunicorn-nginx-docker","free":true,"listed":false,"github":"https://github.com/leopard627/django-gunicorn-nginx-docker","clone":"git clone https://github.com/leopard627/django-gunicorn-nginx-docker.git","description":"django gunicorn docker example","language":"Python","stars":57,"topics":["python3","django","nginx","gunicorn","docker","django-gunicorn-docker"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"django-gunicorn-docker Production-ready Django deployment with Gunicorn and high-performance Uvicorn workers in Docker. Tech Stack - Python : 3.13 - Django : 5.2.8 (LTS) - Gunicorn : 23.0.0 - Uvicorn : 0.38.0 (ASGI worker with uvloop and httptools) - Supervisor : 4.3.0 Features - ASGI/WSGI compatible Django application - High-performance Uvicorn workers with uvloop and httptools - Gunicorn as HTTP server - Supervisor for process management - Docker Compose for easy deployment - Development and production settings separation - Security headers configured - Lightweight architecture without nginx overhead Quick Start Development Environment Docker Compose (Recommended) Stop Containers Manual Docker Build Build the Image Run the Container Configuration Environment Settings The application supports different environment configurations: - Development : django gunicorn.settings.development - Production : django gunicorn.settings.product Set the environment using the SERVICE ARG build argument: Gunicorn Configuration Located at deploy tools/gunicorn conf.py : - Bind address: 0.0.0.0:8000 - Worker class: Custom Uvicorn worker with uvloop and httptools - Workers: (CPU cores 2) + 1 - Max requests: 1000 (with jitter) - Timeout: 15 seconds - Keepalive: 62 seconds Architecture This project uses a simplified architecture without nginx: Why no nginx? - Simpler architecture with fewer moving parts - Lower resource usage (memory and CPU) - Easier to maintain and debug - Gunicorn + Uvicorn work","default_branch":null,"files":null,"tree":[],"storefront":"/r/leopard627","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/leopard627/django-gunicorn-nginx-docker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}