Django Docker Template

screenshot of Django Docker Template
django

Django Docker Template

Dockerized Django with Postgres, Gunicorn, and Traefik or Caddy (with auto renew Let's Encrypt)

Overview:

The Django + Docker project is a template that provides a well-configured Django project with a technology stack that includes Python, Django, PostgreSQL, Gunicorn, Traefik, Docker, and Docker Compose. It aims to simplify the development process by eliminating complex deployment issues at an early stage. The template includes a basic poll application from the official Django tutorial as an example, which can be deleted if desired.

Features:

  • Individual settings: The template provides individual settings that can be changed using environment variables.
  • Dockerized development: The template allows for building and debugging the Django project within a Docker container.
  • Ready-made docker-compose file: The template includes a docker-compose file that brings together Postgres, Django, Gunicorn, and Traefik.
  • Serving static files with Nginx: The template enables serving static files, including user-uploaded files, with Nginx.
  • Automatic database migration and static file collection: The template automatically handles database migration and static file collection when starting or restarting the Django container.
  • Automatic creation of first user: The template automatically creates the first user in Django with a default login and password.
  • Automatic Let's Encrypt certificate creation and renewal: The template facilitates the automatic creation and renewal of Let's Encrypt certificate.
  • Minimal dependencies: The template comes with minimal dependencies, allowing for easy customization and expansion.
django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.