refactor(cache): 統一 cache SOT 並啟用 gunicorn preload
ADR-017 Phase 3f-2:新增 services/cache_manager.py,讓 sales/import/export/daily/dashboard 共用同一份 in-memory cache;cache_service 改為相容 shim;Dockerfile/docker-compose 啟用 gunicorn --preload。
This commit is contained in:
@@ -48,7 +48,7 @@ services:
|
||||
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", "-", "app:app"]
|
||||
command: ["gunicorn", "--bind", "0.0.0.0:80", "--workers", "4", "--timeout", "300", "--access-logfile", "-", "--error-logfile", "-", "--preload", "app:app"]
|
||||
volumes:
|
||||
# 持久化數據
|
||||
- ./data:/app/data
|
||||
|
||||
Reference in New Issue
Block a user