This commit is contained in:
jeremygan2021
2026-02-10 22:31:00 +08:00
parent 15c3954e75
commit 0ea5975c68
3 changed files with 23 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
services:
backend:
build: ./backend
command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
# 使用 gunicorn 替代 runserver提高稳定性
command: sh -c "python manage.py migrate && gunicorn --bind 0.0.0.0:8000 config.wsgi:application"
volumes:
- ./backend:/app
ports: