Run migrations before starting dev server
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m21s

Chains 'migrate --noinput' before 'runserver' in the web
service command so migrations are applied automatically on
'docker compose up'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
codex_a
2026-02-28 18:53:32 +00:00
parent 7d226bc4ef
commit b73a2d4d72

View File

@@ -2,7 +2,9 @@ services:
web:
build: .
working_dir: /app
command: python manage.py runserver 0.0.0.0:8000
command: >
sh -c "python manage.py migrate --noinput &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
ports: