This is intended to be used as a template repository for django projects running with docker and docker-compose
docker-compose run web django-admin startproject djangoexample .
Go to your settings.py inside the project folder created in previous steps and modify it accordingly your database settings. Here an example:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django',
'USER': 'userdjango',
'PASSWORD': 'passworddjango',
'HOST': 'db',
'PORT': 3306,
}
}
docker-compose run web python manage.py startapp polls
docker-compose run web python manage.py migrate
docker-compose run web python manage.py createsuperuser
docker-compose up