Dockerized Django (Production ready in 1 click)

Photo by Jakob Owens on Unsplash

Dockerized Django (Production ready in 1 click)

Hi reader,

Presenting to you a turnkey solution that allows you to effortlessly launch your Django server with a single script. Whether you're in the early stages of development or preparing to go live in a production environment, my Dockerized Django application has you covered. Just unzip the repository, execute ./ for development, or ./ for production on your server. With this boilerplate, you'll be hosting your Django application with HTTPS support and Django 4.2 LTS.

You can buy it here:


  • Django-Starter-Boilerplate: A production-ready, SSL-enabled, and containerized Django boilerplate that streamlines your deployment process.


  • Docker: The industry-standard containerization platform.

  • Docker Compose: A tool for defining and running multi-container Docker applications.

Getting Started with Docker:

  1. Unzip the repository.

  2. Create a .env file by copying .env.sample with the command: cp .env.sample .env.

  3. Establish the necessary directories, namely templates and static, at the base level where resides.

  4. Launch the containers using ./

  5. To stop the containers, use ./

For Production:

  • Create a file and populate it by copying and replacing values from .env.sample.

  • Configure your DNS 'A' records to point to the value specified in the VIRTUAL_HOST variable within the file.

  • Execute ./ to initiate the production-ready containers.

Note: In a development environment, ./ also removes the associated volumes, so use this command with caution.

Running Without Docker:

  1. Unzip the repository.

  2. Create a .env file using .env.sample As a template: cp .env.sample .env.

  3. Inside the .env file set DEBUG to True and SQL_ENGINE to django.db.backends.sqlite3.

  4. Create the required directories, templates, and static, at the base level where is located.

  5. Initiate your Django server with the command: python runserver.

That's it! With this production-ready Dockerized Django application, you can expedite your Django project deployment, confident in its performance, security, and ease of use. Say goodbye to the complexities of setup and hello to efficient Django application hosting.

If you get stuck while deploying or running this boilerplate, reach out to me at Twitter @raturinitin

You can buy it here:

Did you find this article valuable?

Support Nitin Raturi by becoming a sponsor. Any amount is appreciated!