fix: make backend healthcheck zsh-safe
This commit is contained in:
parent
606980bb7c
commit
54de74d44c
1 changed files with 4 additions and 4 deletions
8
.github/workflows/cd.yml
vendored
8
.github/workflows/cd.yml
vendored
|
|
@ -81,11 +81,11 @@ jobs:
|
|||
ssh prod '
|
||||
set -euo pipefail
|
||||
for i in $(seq 1 30); do
|
||||
status=$(docker inspect -f "{{.State.Health.Status}}" danangble-be 2>/dev/null || true)
|
||||
[ "$status" = healthy ] && exit 0
|
||||
[ "$status" = unhealthy ] && docker logs --tail 80 danangble-be && exit 1
|
||||
health_status=$(docker inspect -f "{{.State.Health.Status}}" danagble-be 2>/dev/null || true)
|
||||
[ "$health_status" = healthy ] && exit 0
|
||||
[ "$health_status" = unhealthy ] && docker logs --tail 80 danagble-be && exit 1
|
||||
sleep 2
|
||||
done
|
||||
docker logs --tail 80 danangble-be
|
||||
docker logs --tail 80 danagble-be
|
||||
exit 1
|
||||
'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue