Skip to content

Dockerfile and configuration files to build a working Django container with uwsgi and nginx

Notifications You must be signed in to change notification settings

wilane/django-uwsgi-nginx

This branch is 12 commits ahead of darron/django-uwsgi-nginx:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c625566 · Jun 10, 2016

History

14 Commits
Jun 9, 2016
Jun 9, 2016
Oct 13, 2013
Jun 10, 2016
Jun 10, 2016
Oct 13, 2013
Jun 9, 2016
Jun 10, 2016
Jun 10, 2016
Oct 13, 2013

Repository files navigation

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 https://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

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 https://github.com/xenith/django-base-template 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 wsgi.py file is relative to that. Also note that the template contains a conf directory with nginx, supervisor and uwsgi configs

About

Dockerfile and configuration files to build a working Django container with uwsgi and nginx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published