Nginx reverse proxy for Django applications
2.9K
Nginx web server for Django projects
Nginx reverse proxies connections from port 5000 to a Django container and maps the /static/ and /media/ URL roots to the app's static and media files respectively.
To run the container and bind the port 5000 to the host machine; run the following:
docker run -p 5000:5000 -v static:/app/staticfiles -v media:/srv/media bitcast/django-nginx
The image expects a configuration file in /etc/nginx/proxy/default.conf. This file is included in the location / block of the Nginx site configuration and contains the proxy_pass directive to use. For default use when both containers are run on the same host, this can contain the following:
proxy_pass http://localhost:8000;
Content type
Image
Digest
sha256:ade1e0c57…
Size
54.3 MB
Last updated
over 3 years ago
docker pull bitcast/django-nginx:dev