Sign inSign up

bearonis/nginx-gunicorn

By bearonis

•Updated almost 11 years ago

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

Image
2

1.1K

bearonis/nginx-gunicorn repository overview

⁠An Nginx/Gunicorn Docker Image

This docker container allows you to seamlessly reverse-proxy to a container running a python wsgi application being served up by gunicorn.

⁠How do I use it?

Follow the instructions here to get your wsgi application linked up to a nginx on port 80.

⁠1) Start your wsgi container

Run your wsgi application on port 8000, for example:

docker run --name wsgi-app -d -p 8000:8000 app.py
⁠2) Run a linked nginx container

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.

Tag summary

Content type

Image

Digest

sha256:e556f91fa…

Size

52.2 MB

Last updated

almost 11 years ago

docker pull bearonis/nginx-gunicorn