Skip to content

Commit 5bec2db

Browse files
author
Maxence COEUR
committed
exit 1 si bon
1 parent e94f714 commit 5bec2db

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎.github/workflows/dotnet.yml‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,27 @@ jobs:
132132
docker image prune -f
133133
134134
docker compose ps
135+
135136
echo "Health check..."
136-
for i in {1..30}; do
137+
138+
healthy=0
139+
140+
for i in $(seq 1 30); do
137141
if curl -fsS http://localhost:8080/health; then
142+
echo ""
138143
echo "API is healthy"
139-
exit 0
144+
healthy=1
145+
break
140146
fi
141147
142148
echo "API not ready yet... attempt $i/30"
143149
docker compose ps
144150
sleep 5
145151
done
146152
147-
echo "API failed to become healthy"
148-
docker compose logs api --tail=200
149-
exit 1
153+
if [ "$healthy" -ne 1 ]; then
154+
echo "API failed to become healthy"
155+
docker compose logs api --tail=200
156+
exit 1
157+
fi
150158
EOF

‎TableMasterApi/docker-compose.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.8'
2-
31
services:
42
postgres:
53
image: postgres:18-alpine

0 commit comments

Comments
 (0)