Skip to content

Commit 93aa57c

Browse files
committed
fix(ci): use absolute isql path, 127.0.0.1, and add healthcheck debug info
1 parent b8c9269 commit 93aa57c

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,22 @@ jobs:
4848
max_wait=300
4949
current_wait=0
5050
while [ $current_wait -lt $max_wait ]; do
51-
if [ "$(docker compose ps -q web | xargs docker inspect -f '{{.State.Health.Status}}')" = "healthy" ] &&
52-
[ "$(docker compose ps -q firebird | xargs docker inspect -f '{{.State.Health.Status}}')" = "healthy" ]; then
51+
web_status=$(docker compose ps --format json web | jq -r '.[0].Health' 2>/dev/null || docker inspect -f '{{.State.Health.Status}}' $(docker compose ps -q web))
52+
firebird_status=$(docker compose ps --format json firebird | jq -r '.[0].Health' 2>/dev/null || docker inspect -f '{{.State.Health.Status}}' $(docker compose ps -q firebird))
53+
54+
if [ "$web_status" = "healthy" ] && [ "$firebird_status" = "healthy" ]; then
5355
echo "Services are healthy!"
54-
docker compose logs
5556
exit 0
5657
fi
57-
echo -n "."
58-
sleep 5
59-
current_wait=$((current_wait + 5))
58+
echo "Waiting... Web: $web_status, Firebird: $firebird_status"
59+
sleep 10
60+
current_wait=$((current_wait + 10))
6061
done
6162
echo "Services did not become healthy in time."
63+
echo "--- Firebird Healthcheck Logs ---"
64+
docker inspect --format='{{json .State.Health}}' $(docker compose ps -q firebird)
65+
echo "--- Web Healthcheck Logs ---"
66+
docker inspect --format='{{json .State.Health}}' $(docker compose ps -q web)
6267
docker compose logs
6368
exit 1
6469

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
FIREBIRD_ROOT_PASSWORD: test
88
FIREBIRD_DATABASE: test.fdb
99
healthcheck:
10-
test: ["CMD-SHELL", "isql -user sysdba -password test localhost:/var/lib/firebird/data/test.fdb -q -e 'quit;'"]
10+
test: ["CMD-SHELL", "/opt/firebird/bin/isql -user sysdba -password test 127.0.0.1:/var/lib/firebird/data/test.fdb -q -e 'quit;'"]
1111
interval: 10s
1212
timeout: 10s
1313
retries: 30

0 commit comments

Comments
 (0)