deotalandAi/apps/frontend/docker-compose.prod.yml

33 lines
701 B
YAML

version: '3.8'
services:
frontend:
image: deotaland-frontend:v1.0.0 # 使用预构建镜像
ports:
- "3000:3000"
environment:
- NODE_ENV=production
restart: unless-stopped
container_name: deotaland-frontend-prod
# 生产环境配置
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
# 健康检查
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# 日志配置
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"