Skip to content

begindeep/django-start

Repository files navigation

Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot

🚀 Features

A Django stater project with fully basic requirements for a production-ready version.

  1. Dockerizing Django with Postgres, Gunicorn, and Nginx. Refer: django-on-docker
  2. Configuration for Nginx and Certbot with Let’s Encrypt on docker-compose. Refer: nginx-certbot
  3. Django REST framework sample.
  4. A batteries-included, opinionated template for Django. Refer: djangox

Development

Uses the default Django development server.

  1. Rename .env.dev-sample to .env.dev.

  2. Update the environment variables in the docker-compose.yml and .env.dev files.

  3. Build the images and run the containers:

    $ docker-compose up -d --build

    Test it out at http://localhost:8000.

Production

Uses gunicorn + nginx.

  1. Rename .env.prod-sample to .env.prod and .env.prod.db-sample to .env.prod.db. Update the environment variables.

  2. Build the images and run the containers:

    $ docker-compose -f docker-compose.prod.yml up -d --build

    Test it out at http://localhost:1337.

  3. Modify init-letsencrypt.sh & app.conf with domains and email addresses then running it:

    $ ./init-letsencrypt.sh

About

Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot. A fully Django starter project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published