Public Repository

Last pushed: a month ago
Short Description
Base Image for Python services with uWSGI and Nginx
Full Description

Supported Tags

  • latest
  • python35

Python 2.7

FROM doublehorn/uwsgi-nginx-base:latest

COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . /app
WORKDIR /app

CMD ["/usr/bin/supervisord"]

Python 3.5

This version uses a onbuild scenario where the base image already knows to install your requirements.txt and copies your application to /usr/src/app. It expects a /usr/src/app/uwsgi.ini to exist. This image should only be used if you expect to have a application which would require an HTTP interface.

This image also has a built in stats collector for uwsgi and will attempt to post stats to http://service-stats with the hostname and stats.

See: http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html

You can disable this functionality by replacing /etc/supervisor/conf.d/programs.conf

FROM doublehorn/uwsgi-nginx-base:python35

Required Files for Each Service

At base of your service you should have a uwsgi.ini, heres a sample:

[uwsgi]
socket=/tmp/uwsgi.sock
chown-socket=nginx:nginx
chmod-socket=664
wsgi-file=/app/app.py
processes=5
Docker Pull Command
Owner
doublehorn

Comments (0)