-
Notifications
You must be signed in to change notification settings - Fork 165
/
run.sh
executable file
·20 lines (17 loc) · 743 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -e
./build.sh
echo "Starting the docker container"
docker compose up --force-recreate -d
# Wait for the server to be ready. Server is ready when the log contains something like "org.apache.catalina.startup.Catalina.start Server startup in 3400 ms".
printf '%s' "Waiting for container to be ready"
while ! docker compose logs rdf4j | grep -q "Server startup in"; do
printf '%s' "."
# Exit with error if we have looped 30 times (e.g. 30 seconds)
((c++)) && ((c == 30)) && echo "" && docker compose logs | tee && echo "" && docker ps -a | tee && printf '\n%s\n' "Timed out while waiting!" >&2 && exit 1
sleep 1
done
echo ""
echo ""
echo "Workbench is available at http://localhost:8080/rdf4j-workbench"
echo ""