Very quick and easy way to bootstrap run a django web server in a docker container.
- Clone this repo
- Go to repo root
- Initialize:
sudo docker-compose -f docker-compose-setup.yml run webinit django-admin startproject my_project .
- To use postgres, change database section in
my_project/settings.py
to:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'db',
'PORT': 5432,
}
}
- Start:
docker-compose up
wait-for-it.sh
by douglas-gibbons https://github.com/vishnubob/wait-for-it