Skip to content

Commit ea21fe2

Browse files
author
Johannes Lichtenberger
committed
Fix Docker Compose configuration and improve service readiness checks
- Fix Keycloak URL to use service name 'keycloak' instead of 'localhost' (containers in Docker Compose must use service names to communicate) - Uncomment and use wait.sh to properly wait for Keycloak to be ready - Add wait loop for SirixDB server to be ready before running tests - This should fix CI test failures caused by services not being ready
1 parent 5d0e96f commit ea21fe2

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

test.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
echo "starting the docker environment"
22
docker compose -f ./tests/resources/docker-compose.yml up -d keycloak
3-
# bash ./tests/resources/wait.sh
4-
sleep 5
3+
echo "waiting for keycloak to be ready..."
4+
bash ./tests/resources/wait.sh
55
docker compose -f ./tests/resources/docker-compose.yml up -d server
6-
sleep 5
6+
echo "waiting for sirix server to be ready..."
7+
bash -c 'for i in {1..30}; do if curl -k -s -f https://localhost:9443 > /dev/null 2>&1; then echo "SirixDB is ready"; break; fi; echo "Waiting for SirixDB..."; sleep 2; done'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"use.http": true,
33
"port": 9443,
4-
"keycloak.url": "http://localhost:8080/realms/sirixdb",
4+
"keycloak.url": "http://keycloak:8080/realms/sirixdb",
55
"client.secret": "78a294c4-0492-4e44-a35f-7eb9cab0d831"
66
}

0 commit comments

Comments
 (0)