Sign inSign up

bitcast/django-nginx

By bitcast

•Updated over 3 years ago

Nginx reverse proxy for Django applications

Image
0

2.9K

bitcast/django-nginx repository overview

⁠Django Nginx

Nginx web server for Django projects

⁠Overview

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.

⁠Running

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

⁠Configuration

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⁠;

Tag summary

Content type

Image

Digest

sha256:ade1e0c57…

Size

54.3 MB

Last updated

over 3 years ago

docker pull bitcast/django-nginx:dev