gunicorn
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user