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>
This commit is contained in:
@@ -14,3 +14,13 @@ services:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user