An nginx docker image with gunicorn reverse proxy setup on port 8000.
1.1K

This docker container allows you to seamlessly reverse-proxy to a container running a python wsgi application being served up by gunicorn.
Follow the instructions here to get your wsgi application linked up to a nginx on port 80.
Run your wsgi application on port 8000, for example:
docker run --name wsgi-app -d -p 8000:8000 app.py
If you're working with this repo go ahead and build the container:
docker build -t nginx .
or, you can pull the trusted build from bearonis/nginx-gunicorn, if you
don't need to modify the container.
Now, run the nginx container using the --link option:
docker run -d --name nginx -p 80:80 --link wsgi-app:gunicorn nginx
Enjoy your wsgi application that's being served up on port 80.
The key point is to have your application running on port 8000 and for you to link your application with the name gunicorn, if you do that then you should have a seamless reverse proxy.
Content type
Image
Digest
sha256:e556f91fa…
Size
52.2 MB
Last updated
almost 11 years ago
docker pull bearonis/nginx-gunicorn