This commit is contained in:
jeremygan2021
2026-02-10 22:38:39 +08:00
parent 0ea5975c68
commit c55c4ca374
3 changed files with 26 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
services:
backend:
build: ./backend
# 使用 gunicorn 替代 runserver提高稳定性
command: sh -c "python manage.py migrate && gunicorn --bind 0.0.0.0:8000 config.wsgi:application"
# 使用 gunicorn 替代 runserver提高稳定性,并捕获标准输出
command: sh -c "python manage.py collectstatic --noinput && python manage.py migrate && gunicorn --bind 0.0.0.0:8000 --access-logfile - --error-logfile - config.wsgi:application"
volumes:
- ./backend:/app
ports: