Files
zhimingge/docker-compose.yml
T
dekun 38bbc7145a Add /api/health and harden Docker deploy script for API route rollout.
404 on /api/ai indicates stale container; deploy script now uses --no-cache, stops PM2/port conflicts, and verifies /api/health.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 22:42:28 +08:00

27 lines
596 B
YAML

services:
zhimingge:
build:
context: .
dockerfile: Dockerfile
image: zhimingge:latest
container_name: zhimingge
restart: unless-stopped
ports:
- "3130:3130"
env_file:
- .env.local
environment:
NODE_ENV: production
PORT: "3130"
HOSTNAME: "0.0.0.0"
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"fetch('http://127.0.0.1:3130/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\"",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s