Public | Automated Build

Last pushed: 2 years ago
Short Description
Dockerfile and configuration files to build a working Django Debian container with uwsgi and nginx based on
Full Description

Django, uWSGI and Nginx in a container

This Dockerfile allows you to build a Docker container with a fairly standard
and speedy setup for Django with uWSGI.

uWSGI from a number of benchmarks has shown to be the fastest server
for python applications and allows lots of flexibility.

Most of this setup comes from the excellent tutorial on

Feel free to clone this and modify it to your liking. And feel free to
contribute patches.

Build and run

  • docker build -t webapp .
  • docker run -d webapp

How to insert your application

In /usr/src/app/src currently a django project is created with startproject
using the template from that
features "set of basic templates built from HTML5Boilerplate 4.1.0 and Twitter
Bootstrap 3.0.2 (located in the base app, with css and javascript loaded from
CloudFlare CDN by default)." You will probably want to replace the content of
/app/src with the root of your django project if you already have one.

uWSGI chdirs to /usr/src/app/src so in uwsgi.ini you will need to make sure the
python path to the file is relative to that. Also note that the
template contains a conf directory with nginx, supervisor and uwsgi configs

Docker Pull Command
Source Repository