Update healthcheck commands in docker-compose.yml to dynamically use the service hostname for improved flexibility
This commit is contained in:
@@ -7,7 +7,7 @@ services:
|
||||
depends_on: &langfuse-depends-on
|
||||
- clickhouse
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "const http=require('http');const req=http.get('http://localhost:3030/api/health',res=>{process.exit(res.statusCode===200?0:1)});req.on('error',()=>process.exit(1));"]
|
||||
test: ["CMD", "node", "-e", "const http=require('http');const os=require('os');const host=os.hostname();const url='http://' + host + ':3030/api/health';const req=http.get(url,res=>{process.exit(res.statusCode===200?0:1)});req.on('error',()=>process.exit(1));"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -79,7 +79,7 @@ services:
|
||||
env_file:
|
||||
- stack.env
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "const http=require('http');const req=http.get('http://localhost:3000/api/public/health',res=>{process.exit(res.statusCode===200?0:1)});req.on('error',()=>process.exit(1));"]
|
||||
test: ["CMD", "node", "-e", "const http=require('http');const os=require('os');const host=os.hostname();const url='http://' + host + ':3000/api/public/health';const req=http.get(url,res=>{process.exit(res.statusCode===200?0:1)});req.on('error',()=>process.exit(1));"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user