修复OCR容器编排

This commit is contained in:
yml
2026-05-21 17:57:34 +08:00
parent 0931975ed4
commit 6a9c231026
6 changed files with 44 additions and 5 deletions
+15
View File
@@ -15,6 +15,18 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
ocr-worker:
image: ${OCR_IMAGE:-order_site-ocr-worker:latest}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8100/health || exit 1"]
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
environment:
TZ: ${TZ:-Asia/Shanghai}
backend:
build:
context: .
@@ -25,6 +37,8 @@ services:
depends_on:
postgres:
condition: service_healthy
ocr-worker:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:3000/health/ready || exit 1"]
interval: 5s
@@ -37,6 +51,7 @@ services:
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/order_site}
DATABASE_SSL: ${DATABASE_SSL:-false}
DATABASE_MAX_CONNECTIONS: ${DATABASE_MAX_CONNECTIONS:-20}
OCR_BASE_URL: ${OCR_BASE_URL:-http://ocr-worker:8100}
CLAIM_BASE_URL: ${CLAIM_BASE_URL:-http://localhost/#/claim}
TENCENT_REDEEM_PROOF_MODE: ${TENCENT_REDEEM_PROOF_MODE:-full}
TENCENT_BROWSER_HEADLESS: ${TENCENT_BROWSER_HEADLESS:-true}