Skip to content

Commit d75d543

Browse files
committed
docker compose healthcheck
1 parent 91f11da commit d75d543

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ services:
55
context: .
66
dockerfile: Dockerfile
77
image: serverstatus_server
8+
healthcheck:
9+
test: curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'
10+
interval: 30s
11+
timeout: 10s
12+
retries: 5
813
container_name: serverstatus
914
restart: unless-stopped
1015
networks:

0 commit comments

Comments
 (0)