changed the health check metod

This commit is contained in:
2026-06-02 01:29:59 +02:00
parent f6133116a2
commit 770fb6e32a
+6 -9
View File
@@ -6,31 +6,28 @@ services:
restart: unless-stopped
env_file: ./backend/.env
volumes:
- sloth-data:/data
- ./sloth-data:/data
networks:
- sloth-net
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/ping"]
interval: 30s
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/ping', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 15s
timeout: 5s
retries: 3
retries: 5
start_period: 10s
frontend:
build: ./frontend
container_name: sloth-frontend
restart: unless-stopped
ports:
- "80:80"
- "8088:80"
networks:
- sloth-net
depends_on:
backend:
condition: service_healthy
volumes:
sloth-data:
driver: local
networks:
sloth-net:
driver: bridge