This repo will give you the basic configuration for setting docker for your django project
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
Change the default values in docker-compose.yml
Open port 80 and 443
docker-compose build
docker-compose up -d
docker exec -it dockerizing-django_website_1 bash
python manage.py createsuperuser
Feel free to make this code better :)