fix: nginx build context, playout health check retry loop
This commit is contained in:
1 parent
afb9a41404
commit
43c1a31660
2 files changed
+31
-9
No files matched your search
+14
-2
@@ -69,9 +69,21 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_HOST: tcp://192.168.88.40:2375
|
DOCKER_HOST: tcp://192.168.88.40:2375
|
||||||
run: |
|
run: |
|
||||||
sleep 10
|
# Wait for playout to stabilize (it may restart during init)
|
||||||
|
sleep 20
|
||||||
curl -f http://192.168.88.40:3000/health || exit 1
|
curl -f http://192.168.88.40:3000/health || exit 1
|
||||||
docker exec linearvoid-playout curl -sf http://localhost
|
# Retry playout health check since it may still be initializing
|
||||||
|
for i in $(seq 1 6); do
|
||||||
|
if docker exec linearvoid-playout curl -sf http://localhost:8081/health; then
|
||||||
|
echo "Playout is healthy"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Playout not ready yet (attempt $i/6), waiting 5s..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Playout failed to become healthy after 6 attempts"
|
||||||
|
docker logs linearvoid-playout --tail 50
|
||||||
|
exit 1
|
||||||
curl -f http://192.168.88.40:3000/health || exit 1
|
curl -f http://192.168.88.40:3000/health || exit 1
|
||||||
docker exec linearvoid-playout curl -sf http://localhost:8081/health || exit 1
|
docker exec linearvoid-playout curl -sf http://localhost:8081/health || exit 1
|
||||||
|
|
||||||
|
|||||||
+17
-7
@@ -119,13 +119,23 @@ jobs:
|
|||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Build and push Nginx image
|
- name: Build and push Nginx image
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
TAGS="${{ steps.meta-nginx.outputs.tags }}"
|
||||||
context: .
|
LABELS="${{ steps.meta-nginx.outputs.labels }}"
|
||||||
dockerfile: infrastructure/nginx/Dockerfile
|
TAG_ARGS=""
|
||||||
push: true
|
for tag in $TAGS; do
|
||||||
tags: ${{ steps.meta-nginx.outputs.tags }}
|
TAG_ARGS="$TAG_ARGS --tag $tag"
|
||||||
labels: ${{ steps.meta-nginx.outputs.labels }}
|
done
|
||||||
|
LABEL_ARGS=""
|
||||||
|
while IFS= read -r label; do
|
||||||
|
[ -n "$label" ] && LABEL_ARGS="$LABEL_ARGS --label $label"
|
||||||
|
done <<< "$LABELS"
|
||||||
|
docker buildx build \
|
||||||
|
--push \
|
||||||
|
--file infrastructure/nginx/Dockerfile \
|
||||||
|
$TAG_ARGS \
|
||||||
|
$LABEL_ARGS \
|
||||||
|
.
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: docker
|
needs: docker
|
||||||
|
|||||||
Reference in new issue
Block a user