This commit is contained in:
@@ -46,10 +46,10 @@ jobs:
|
||||
# It checks the status every 5 seconds. If the container doesn't become healthy
|
||||
# within the timeout, the script will exit with an error, failing the workflow.
|
||||
end_time=$(( $(date +%s) + 300 )) # 5 minute timeout
|
||||
while [ "$(docker inspect -f {{.State.Health.Status}} tor 2>/dev/null || echo 'unhealthy')" != "healthy" ]; do
|
||||
while [ "$(docker inspect -f {{.State.Health.Status}} tor-proxy 2>/dev/null || echo 'unhealthy')" != "healthy" ]; do
|
||||
if [ $(date +%s) -gt $end_time ]; then
|
||||
echo "Timeout: Container did not become healthy within 5 minutes."
|
||||
docker logs tor # Print logs for debugging
|
||||
docker logs tor-proxy # Print logs for debugging
|
||||
exit 1
|
||||
fi
|
||||
sleep 5
|
||||
|
||||
Reference in New Issue
Block a user