changed the health check metod
This commit is contained in:
+6
-9
@@ -6,31 +6,28 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: ./backend/.env
|
env_file: ./backend/.env
|
||||||
volumes:
|
volumes:
|
||||||
- sloth-data:/data
|
- ./sloth-data:/data
|
||||||
networks:
|
networks:
|
||||||
- sloth-net
|
- sloth-net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/ping"]
|
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: 30s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
container_name: sloth-frontend
|
container_name: sloth-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8088:80"
|
||||||
networks:
|
networks:
|
||||||
- sloth-net
|
- sloth-net
|
||||||
depends_on:
|
depends_on:
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
volumes:
|
|
||||||
sloth-data:
|
|
||||||
driver: local
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
sloth-net:
|
sloth-net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user