Update healthcheck command in Docker Compose to use wget for improved reliability
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
build: ./server
|
build: ./server
|
||||||
@@ -7,7 +5,7 @@ services:
|
|||||||
- inventory-network
|
- inventory-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3001/api/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
|
|||||||
Reference in New Issue
Block a user