add superuser creation command and update settings for environment variables
This commit is contained in:
19
docker-compose.yml
Normal file
19
docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
command: >
|
||||
sh -c "python manage.py migrate &&
|
||||
python manage.py createsuperuser_if_not_exists &&
|
||||
python manage.py collectstatic --noinput &&
|
||||
gunicorn mail_management.wsgi:application --bind 0.0.0.0:8000"
|
||||
volumes:
|
||||
- static_volume:/app/staticfiles
|
||||
- media_volume:/app/media
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
volumes:
|
||||
static_volume:
|
||||
media_volume:
|
Reference in New Issue
Block a user