Healthcheck repariert - er verhinderte die Traefik-Registrierung
Deploy App / deploy (push) Successful in 21s
Deploy App / deploy (push) Successful in 21s
busybox-wget loest localhost nach ::1 auf, nginx lauschte nur auf IPv4. Der Healthcheck schlug damit dauerhaft fehl, der Container blieb 'starting', und Traefik nimmt Container ohne 'healthy'-Status nicht in die Routing-Tabelle auf. Daher 404 trotz korrekter Labels. - Healthcheck auf 127.0.0.1 - nginx lauscht zusaetzlich auf IPv6 - Workflow wartet auf 'healthy' und prueft den Router Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,24 +18,15 @@ jobs:
|
||||
docker compose down || true
|
||||
docker compose up -d --build
|
||||
docker image prune -f
|
||||
- name: Traefik-Konfiguration
|
||||
- name: Bereitschaft pruefen
|
||||
run: |
|
||||
echo "-- Mounts --"
|
||||
docker inspect -f '{{range .Mounts}}{{.Type}} {{.Source}} -> {{.Destination}}{{println}}{{end}}' traefik || true
|
||||
echo "-- Env --"
|
||||
docker inspect -f '{{range .Config.Env}}{{.}}{{println}}{{end}}' traefik || true
|
||||
echo "-- Cmd --"
|
||||
docker inspect -f '{{range .Config.Cmd}}{{.}}{{println}}{{end}}' traefik || true
|
||||
echo "-- Konfigdatei im Container --"
|
||||
for f in /etc/traefik/traefik.yml /etc/traefik/traefik.yaml /traefik.yml /traefik.yaml; do
|
||||
echo "### $f"; docker exec traefik cat $f 2>/dev/null || echo "(nicht vorhanden)"
|
||||
cd "/opt/aicds/apps/${GITHUB_REPOSITORY#*/}"
|
||||
for i in $(seq 1 12); do
|
||||
H=$(docker inspect -f '{{.State.Health.Status}}' gartenvisualisierung-app-1 2>/dev/null || echo "-")
|
||||
echo "Versuch $i: health=$H"
|
||||
[ "$H" = "healthy" ] && break
|
||||
sleep 10
|
||||
done
|
||||
echo "-- compose-Dateien aller Apps --"
|
||||
find /opt/aicds -maxdepth 3 -name 'docker-compose.y*ml' 2>/dev/null | while read f; do echo "### $f"; cat "$f"; echo; done
|
||||
echo "-- Gesundheit des garten-Containers --"
|
||||
sleep 45
|
||||
docker inspect -f 'health={{if .State.Health}}{{.State.Health.Status}} fails={{.State.Health.FailingStreak}}{{else}}keiner{{end}}' gartenvisualisierung-app-1 || true
|
||||
docker inspect -f '{{if .State.Health}}{{range .State.Health.Log}}exit={{.ExitCode}} out={{.Output}}{{println}}{{end}}{{end}}' gartenvisualisierung-app-1 | tail -3 || true
|
||||
echo "-- Router-Test von innen --"
|
||||
docker run --rm --network agent-net curlimages/curl:latest -sk -o /dev/null -w 'garten: %{http_code}\n' --max-time 10 -H 'Host: garten.aicds.ch' https://traefik/ || true
|
||||
docker run --rm --network agent-net curlimages/curl:latest -sk -o /dev/null -w 'hello: %{http_code}\n' --max-time 10 -H 'Host: hello-test.aicds.ch' https://traefik/ || true
|
||||
docker inspect -f 'health={{.State.Health.Status}}' gartenvisualisierung-app-1
|
||||
docker run --rm --network agent-net curlimages/curl:latest -sk -o /dev/null \
|
||||
-w 'Router garten: %{http_code}\n' --max-time 10 -H 'Host: garten.aicds.ch' https://traefik/ || true
|
||||
|
||||
Reference in New Issue
Block a user