fix: 单实例锁、应用日志和容器健康检查
This commit is contained in:
@@ -6,10 +6,26 @@ services:
|
||||
- "127.0.0.1:8000:8000"
|
||||
environment:
|
||||
EUNIV_SECRET_KEY: ${EUNIV_SECRET_KEY:?请在环境变量或 .env 中设置 EUNIV_SECRET_KEY}
|
||||
EUNIV_SECRET_KEY_OLD: ${EUNIV_SECRET_KEY_OLD:-}
|
||||
EUNIV_DB_PATH: /data/euniv.db
|
||||
EUNIV_ADMIN_PASSWORD: ${EUNIV_ADMIN_PASSWORD:-}
|
||||
EUNIV_ADMIN_RESET: ${EUNIV_ADMIN_RESET:-}
|
||||
EUNIV_COOKIE_SECURE: ${EUNIV_COOKIE_SECURE:-1}
|
||||
EUNIV_LOG_LEVEL: ${EUNIV_LOG_LEVEL:-INFO}
|
||||
EUNIV_OPENAPI: ${EUNIV_OPENAPI:-}
|
||||
EUNIV_DISABLE_REFRESH: ${EUNIV_DISABLE_REFRESH:-}
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 20s
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health')"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
volumes:
|
||||
- euniv-data:/data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user