add superuser creation command and update settings for environment variables

This commit is contained in:
2025-05-26 23:40:57 +02:00
parent dbe83c9616
commit 4e79d7c1de
11 changed files with 168 additions and 6 deletions

19
docker-compose.yml Normal file
View 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: