diff --git a/compose.yaml b/compose.yaml index a9bde46..d9b5242 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,6 +9,7 @@ services: - path: .env required: false environment: + TZ: ${TZ:-Asia/Shanghai} DATABASE_URL: ${DATABASE_URL:-sqlite:////app/data/checkin.db} LOG_FILE: ${LOG_FILE:-/app/logs/backend.log} SESSION_DIR: ${SESSION_DIR:-/app/sessions} @@ -40,6 +41,8 @@ services: condition: service_healthy ports: - "${CHECKIN_WEB_PORT:-3090}:80" + environment: + TZ: ${TZ:-Asia/Shanghai} restart: unless-stopped healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/health >/dev/null"] diff --git a/deploy/compose.env.example b/deploy/compose.env.example index 309afaa..a3f3c04 100644 --- a/deploy/compose.env.example +++ b/deploy/compose.env.example @@ -4,6 +4,9 @@ # Public web port exposed by the web service. CHECKIN_WEB_PORT=3090 +# Container timezone. Asia/Shanghai is UTC+8. +TZ=Asia/Shanghai + # ==================== Backend runtime paths ==================== # Container-local defaults for the Compose deployment. DATABASE_URL=sqlite:////app/data/checkin.db