Files
photo-live/infra/deploy/docker-compose-ov.yml
T
浅念 c26d6b9a73 fix(deploy): review fixes — smoke photoId field, web healthcheck wget, outbox table name, cdn key shape
Reviewer findings on p5-prep batch:
1. BLOCKING: prod-smoke.sh visibility grep used "id" but API items
   serialize photoId (cn public.service / ov public-ov.service) — every
   healthy deployment would false-FAIL release gate ④. 4 sites fixed.
2. web/web-ov healthchecks used curl on nginx:alpine (absent) → perpetual
   false-unhealthy; switched to busybox wget.
3. RUNBOOK rollback rule cited nonexistent sync_outbox → outbox_events.
4. cdn-checklist invalidation sample key shape aligned to actual
   variantsObjectKey layout (.../albums/{albumId}/variants/{photoId}/{version}/{variant}.jpg).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 02:03:44 +08:00

59 lines
1.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# infra/deploy/docker-compose-ov.yml —— 海外(ov)生产编排(P5-prep Task 1)。
# 只跑两个容器:api-ov(ov 公开读/互动/WS + sync-inbox + emergency 通道,全部
# 内嵌——核实自 services/api/src/app-ov.module.ts)与 web-ov(nginx 网关)。
# 【无 sync 进程】:cn→ov 内容同步的发送器/对账/统计回传全在 cn 侧
# (docker-compose.cn.yml 的 sync 服务),跨地域经公网连 ov 的 API + MySQL。
#
# 使用:同目录放 .env.production-ov(模板见仓库根 .env.production.example-ov);
# 网络与 1Panel 复用说明同 docker-compose.cn.yml 头注。
name: photo-live-ov
x-logging: &default-logging
driver: json-file
options: { max-size: "10m", max-file: "3" }
services:
api-ov:
image: ${SERVER_IMAGE:-photo-live-server:latest}
command: ["api-ov"]
init: true
env_file: .env.production-ov
environment:
PORT_OV: "8081" # main-ov.ts 读 PORT_OV;容器内固定
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-fs", "http://127.0.0.1:8081/v1/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 20s
logging: *default-logging
networks: [photo-net]
web-ov:
image: ${WEB_IMAGE:-photo-live-web:latest}
init: true
environment:
API_UPSTREAM: http://api-ov:8081
ports:
# 同 cn:默认只绑回环供同机 OpenResty 反代(ov 侧主机端口用 8089 区分)。
- "127.0.0.1:8089:80"
restart: unless-stopped
depends_on:
api-ov: { condition: service_healthy }
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://127.0.0.1/"]
interval: 30s
timeout: 5s
retries: 5
start_period: 10s
logging: *default-logging
networks: [photo-net]
networks:
photo-net:
# 说明同 docker-compose.cn.yml(1Panel 网络名按实际调整;或改宿主机 IP 连接)。
name: 1panel-network
external: true