Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 72aeb2f

Browse files
feat: healthcheck
1 parent 06f1928 commit 72aeb2f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compose.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
azurite:
2626
condition: service_healthy
2727
db:
28-
condition: service_started
28+
condition: service_healthy
2929
networks:
3030
- backend
3131

@@ -61,12 +61,12 @@ services:
6161
- "1433:1433"
6262
volumes:
6363
- db-data:/var/opt/mssql
64-
# healthcheck:
65-
# test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P \"${DATABASE_PASSWORD}\" -Q \"SELECT 1;\" || exit 1"]
66-
# interval: 20s
67-
# timeout: 10s
68-
# retries: 6
69-
# start_period: 60s
64+
healthcheck:
65+
test: ["CMD-SHELL", "pgrep -f sqlservr || exit 1"]
66+
interval: 20s
67+
timeout: 10s
68+
retries: 6
69+
start_period: 60s
7070
networks:
7171
- backend
7272

@@ -80,7 +80,7 @@ services:
8080
DATABASE_PASSWORD: "${DATABASE_PASSWORD}"
8181
depends_on:
8282
db:
83-
condition: service_started
83+
condition: service_healthy
8484
networks:
8585
- backend
8686

0 commit comments

Comments
 (0)