dockerizing-django
dockerizing-django copied to clipboard
🐳 Dockerize your Django application.
Dockerize Your Django Project
This repo will give you the basic configuration for setting docker for your django project
Setup
Clone this repository in your working directory
git clone https://github.com/stefins/dockerizing-django.git
Place your project in the MyProject directory
Go to settings.py
and change the DATABASE
section matching your credentials in docker-compose.yml
This project uses WhiteNoise
to serve static files and django-probes
for checking database connection
traefik Setup
Change the default values in docker-compose.yml
SSL Certificate will be autogenerated by traefik
Port Setup
Open port 80 and 443
Starting the server
docker-compose build
docker-compose up -d
Creating superuser
docker exec -it dockerizing-django_website_1 bash
python manage.py createsuperuser
Contributing
Feel free to make this code better :)