fix: use backend liveness health check

This commit is contained in:
lunanting 2026-09-12 16:55:48 +08:00
parent a85acabde5
commit 3229c2a1c3

View File

@ -41,7 +41,7 @@ services:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:4090/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
test: ["CMD", "node", "-e", "const s=require('node:net').connect(4090,'127.0.0.1',()=>{s.end();process.exit(0)});s.setTimeout(3000,()=>process.exit(1));s.on('error',()=>process.exit(1))"]
interval: 10s
timeout: 5s
retries: 18