fix(gunicorn): preload 後重置 SQLAlchemy 連線池
Some checks failed
CD Pipeline / deploy (push) Failing after 9m32s
Some checks failed
CD Pipeline / deploy (push) Failing after 9m32s
This commit is contained in:
@@ -47,8 +47,8 @@ services:
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
ports:
|
||||
- "127.0.0.1:5003:80" # 僅本地連線,透過 Nginx 反向代理(nginx 反代 5003)
|
||||
# 強制使用 gunicorn 綁定 port 80 (覆蓋 Dockerfile CMD)
|
||||
command: ["gunicorn", "--bind", "0.0.0.0:80", "--workers", "4", "--timeout", "300", "--access-logfile", "-", "--error-logfile", "-", "--preload", "app:app"]
|
||||
# 強制使用 gunicorn 綁定 port 80 (覆蓋 Dockerfile CMD);preload + post_fork DB pool reset 見 gunicorn.conf.py
|
||||
command: ["gunicorn", "--config", "gunicorn.conf.py", "app:app"]
|
||||
volumes:
|
||||
# 持久化數據
|
||||
- ./data:/app/data
|
||||
|
||||
Reference in New Issue
Block a user