Production Ready Dockerized Django Application

$0+
0 ratings

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 ./run.sh for development, or ./run-prod.sh for production on your server. With this boilerplate, you'll be hosting your Django application with HTTPS support and Django 4.2 LTS.

Features:

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

Dependencies:

  • 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 manage.py resides.
  4. Launch the containers using ./run.sh.
  5. To stop the containers, use ./stop.sh.

For Production:

  • Create a .env.prod 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 .env.prod file.
  • Execute ./run-prod.sh to initiate the production-ready containers.

Note: In a development environment, ./stop.sh 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 manage.py is located.
  5. Initiate your Django server with the command: python manage.py 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

$
I want this!

You'll get a zip file having dockerized django starter boilerplate

Version
4.2
Size
14.8 KB
Copy product URL
$0+

Production Ready Dockerized Django Application

0 ratings
I want this!