# Write Server Docker Compose 覆盖配置示例 # 复制此文件为 docker-compose.override.yml 并根据需要修改 version: '3.8' services: write-server: # 环境变量覆盖 environment: - NODE_ENV=production - PORT=8016 - TZ=Asia/Shanghai - LOG_LEVEL=info # 端口映射覆盖 ports: - "8016:8016" # 如果需要直接访问,可以添加更多端口 # - "1313:1313" # Hugo 预览 # 资源限制 deploy: resources: limits: cpus: '1' memory: 512M reservations: cpus: '0.5' memory: 256M # 日志配置 logging: driver: "json-file" options: max-size: "10m" max-file: "5" # 健康检查覆盖 healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8016/api/stats"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Nginx 配置覆盖 nginx: # 如果不需要 Nginx,可以注释掉整个服务 # profiles: # - "with-nginx" # 端口映射 ports: - "80:80" - "443:443" # 资源限制 deploy: resources: limits: cpus: '0.5' memory: 256M reservations: cpus: '0.25' memory: 128M # 日志配置 logging: driver: "json-file" options: max-size: "10m" max-file: "3"