Public Repository

Last pushed: 3 years ago
Short Description
nginx paired with python
Full Description

Supported tags and respective Dockerfile links

Why not link containers?

In larger deployments, it's harder to tightly couple an application container with it's nginx configs and make sure that they are always 100% paired together. This does not replace a normal upstream proxy, but this is intended to run in front of say, uwsgi or gunicorn.

How to use this image

Create a Dockerfile in your Python app project

FROM disqus/nginx:python2-onbuild

If you need to override your own nginx config files, you can COPY them in

FROM disqus/nginx:python2-onbuild
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/conf.d/ /etc/nginx/conf.d/
COPY nginx/sites-enabled/ /etc/nginx/sites-enabled/

These images include multiple ONBUILD triggers, which should be all you need to bootstrap most applications. The build will COPY a requirements.txt file, RUN pip install on said file, copy the current directory into /usr/src/app, then run with uwsgi.

You can then build and run the Docker image:

docker build -t my-python-app .
docker run -it --rm --name my-running-app my-python-app

Image Variants

The disqus/nginx images come in many flavors, each designed for a specific use case.


This image is a mashup of nginx + python:<version>, meant for running python based applications behind a tightly coupled nginx.


This image makes deploying a python application behind nginx much easier. It works identically to the python:onbuild images, but also hooks up uwsgi/nginx for you. If your project includes a file in the root, this image will run that with uwsgi and drops an nginx config that will uwsgi_pass to it.

Docker Pull Command