Files
junhong_cmp_fiber/docker-compose.prod.yml
huang 0584a474cc
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
修复部署配置:使用 config.yaml 默认配置和外部服务
- 移除 docker-compose 中的 postgres 和 redis 服务(使用外部服务)
- 移除不必要的环境变量(DB_HOST 等)
- 修正服务端口:8088 → 3000(与 config.yaml 一致)
- 修正健康检查:curl → wget(与 Dockerfile 一致)
- 工作流自动复制 configs 目录和创建 logs 目录
- 使用默认 config.yaml(连接到 cxd.whcxd.cn 数据库)
2026-01-20 09:57:38 +08:00

48 lines
1.0 KiB
YAML

version: '3.8'
services:
api:
image: registry.boss160.cn/junhong/cmp-fiber-api:latest
container_name: junhong-cmp-api
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./configs:/app/configs:ro
- ./logs:/app/logs
networks:
- junhong-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
worker:
image: registry.boss160.cn/junhong/cmp-fiber-worker:latest
container_name: junhong-cmp-worker
restart: unless-stopped
volumes:
- ./configs:/app/configs:ro
- ./logs:/app/logs
networks:
- junhong-network
depends_on:
api:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
junhong-network:
driver: bridge