Update healthcheck command in Docker Compose to use wget for improved reliability

This commit is contained in:
MayaTheShy
2026-03-21 17:35:50 -04:00
parent bd5b1db5a0
commit db0151a616

View File

@@ -1,5 +1,3 @@
version: '3.8'
services:
server:
build: ./server
@@ -7,7 +5,7 @@ services:
- inventory-network
restart: unless-stopped
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
timeout: 3s
start_period: 5s