fix timezone bug

This commit is contained in:
beabigegg
2025-09-21 11:37:39 +08:00
parent a408ce402d
commit 2a0b29402f
22 changed files with 1050 additions and 519 deletions

View File

@@ -1,8 +1,11 @@
services:
# Redis 快取服務
redis:
image: redis:7-alpine
container_name: tempspec-redis
image: panjit-tempspec:redis
build:
context: .
dockerfile: Dockerfile.redis
container_name: panjit-tempspec-redis
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
@@ -15,21 +18,33 @@ services:
timeout: 10s
retries: 5
# ONLYOFFICE Document Server
# ONLYOFFICE Document Server - 使用輕量化版本
onlyoffice:
image: onlyoffice/documentserver:8.0
container_name: tempspec-onlyoffice
image: onlyoffice/documentserver:8.1
container_name: panjit-tempspec-onlyoffice
restart: unless-stopped
environment:
JWT_ENABLED: "true"
JWT_SECRET: ${ONLYOFFICE_JWT_SECRET:-your_jwt_secret_key_here}
JWT_HEADER: "Authorization"
JWT_IN_BODY: "true"
# 使用內建資料庫,不需要外部 PostgreSQL
AMQP_TYPE: "0" # 禁用RabbitMQ以節省資源
# 時區設定
TZ: Asia/Taipei
ports:
- "${ONLYOFFICE_PORT:-12011}:80"
- "${ONLYOFFICE_PORT:-12015}:80"
volumes:
- onlyoffice_data:/var/www/onlyoffice/Data
- onlyoffice_logs:/var/log/onlyoffice
deploy:
resources:
limits:
memory: 3G
cpus: '2.0'
reservations:
memory: 1.5G
cpus: '1.0'
networks:
- tempspec-network
healthcheck:
@@ -40,8 +55,11 @@ services:
# Flask 應用程式
app:
build: .
container_name: tempspec-app
image: panjit-tempspec:main
build:
context: .
dockerfile: Dockerfile
container_name: panjit-tempspec-app
restart: unless-stopped
environment:
# Flask 設定
@@ -57,14 +75,14 @@ services:
# CDN 設定
CDN_DOMAIN: ${CDN_DOMAIN:-}
# LDAP 設定
LDAP_SERVER: ${LDAP_SERVER:-ldap://your-dc.company.com}
LDAP_PORT: ${LDAP_PORT:-389}
LDAP_USE_SSL: ${LDAP_USE_SSL:-False}
LDAP_SEARCH_BASE: ${LDAP_SEARCH_BASE:-DC=company,DC=com}
LDAP_BIND_USER_DN: ${LDAP_BIND_USER_DN:-CN=service,DC=company,DC=com}
LDAP_BIND_USER_PASSWORD: ${LDAP_BIND_USER_PASSWORD:-service_password}
LDAP_USER_LOGIN_ATTR: ${LDAP_USER_LOGIN_ATTR:-userPrincipalName}
# LDAP 設定 (統一配置)
LDAP_SERVER: panjit.com.tw
LDAP_PORT: 389
LDAP_USE_SSL: false
LDAP_SEARCH_BASE: DC=panjit,DC=com,DC=tw
LDAP_BIND_USER_DN: CN=LdapBind,CN=Users,DC=PANJIT,DC=COM,DC=TW
LDAP_BIND_USER_PASSWORD: panjit2481
LDAP_USER_LOGIN_ATTR: userPrincipalName
# SMTP 郵件設定
SMTP_SERVER: ${SMTP_SERVER:-smtp.company.com}
@@ -74,14 +92,16 @@ services:
SMTP_SENDER_PASSWORD: ${SMTP_SENDER_PASSWORD:-smtp_password}
# ONLYOFFICE 設定
ONLYOFFICE_URL: http://localhost:12011/
ONLYOFFICE_URL: http://localhost:12015/
ONLYOFFICE_INTERNAL_URL: http://onlyoffice:80
ONLYOFFICE_JWT_SECRET: ${ONLYOFFICE_JWT_SECRET:-your_jwt_secret_key_here}
# 時區設定
TZ: Asia/Taipei
# 其他設定
UPLOAD_FOLDER: uploads
ports:
- "${APP_PORT:-12010}:5000"
# No external port; only Nginx exposes ports
volumes:
- ./uploads:/app/uploads
- ./static/generated:/app/static/generated
@@ -99,7 +119,7 @@ services:
redis:
condition: service_healthy
onlyoffice:
condition: service_healthy
condition: service_started
networks:
- tempspec-network
healthcheck:
@@ -110,12 +130,14 @@ services:
# Nginx 反向代理 (生產環境自動啟用)
nginx:
image: nginx:alpine
container_name: tempspec-nginx
image: panjit-tempspec:nginx
build:
context: ./nginx
dockerfile: Dockerfile
container_name: panjit-tempspec-nginx
restart: unless-stopped
ports:
- "${NGINX_PORT:-12013}:80"
- "${NGINX_SSL_PORT:-12014}:443"
- "12013:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro