This is an nginx Docker image built upon the python:3.5.1 official Python image. Building nginx upon Python helps save space when deploying nginx with a uWSGI-based Python application that uses the same base image.
This image configures nginx to work with a uWSGI server on an HTTP socket over 3031
port.
By using the HTTP socket it's easy for an nginx container to talk to another uWSGI+app container.
Use this image with Docker Compose.
This image configures nginx to work with a uWSGI server over the uwsgi:3031
HTTP socket.
The uwsgi
hostname should be set on the uWSGI+App container via Docker Compose.
Use this image with Kubernetes.
On this image, nginx is configured to talk to uWSGI over a 127.0.0.1:3031
HTTP socket since containers in Kubernetes pods all share host network.
The nginx container listens on 8080 because we assume that another service will terminate SSL.
The practices employed in this Docker container are built upon the following repositories and documentation:
- Official Nginx docker image showed how to install Nginx on Ubuntu in a Dockerfile.
- The uWSGI docs included nginx configuration information.
- The uwsgi-nginx-docker image from Sebastián Ramírez showed how to install the nginx configuration.
Copyright 2016 LSST/AURA, MIT Licensed.