mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-18 14:15:09 +00:00
health check verifies docker containers status
This commit is contained in:
parent
8d17e125e6
commit
2ac6ac0df2
1 changed files with 12 additions and 12 deletions
24
.github/workflows/deploy.yml
vendored
24
.github/workflows/deploy.yml
vendored
|
|
@ -168,18 +168,18 @@ jobs:
|
|||
# Wait a bit more for services to fully start
|
||||
sleep 60
|
||||
|
||||
# Check if nginx-proxy is responding
|
||||
if curl -f http://${{ env.HETZNER_HOST }}/health; then
|
||||
echo "✅ Deployment successful - Health check passed"
|
||||
else
|
||||
echo "❌ Health check failed"
|
||||
# Show logs for debugging
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
docker compose logs --tail=50
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
# Check if all docker container are up and running
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
count=$(docker container ls --format "{{.Status}}" | grep -v "^Up" | wc -l)
|
||||
if [ $count -gt 0 ]; then
|
||||
echo "❌ $count containers are not running properly"
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
docker compose logs --tail=50
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All containers are running"
|
||||
fi
|
||||
"
|
||||
|
||||
- name: Notify deployment status
|
||||
if: always()
|
||||
|
|
|
|||
Loading…
Reference in a new issue