- Create the Django project by running:
sudo docker-compose run web django-admin startproject <Project Name> .
- Modify the
DATABASES = ...
variable in<Project Name>/settings.py
to...
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'db',
'PORT': 5432,
}
}
- Run with
docker-compose up