Healthcheck repariert - er verhinderte die Traefik-Registrierung
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:
2026-09-09 19:40:07 +02:00
co-authored by Claude Opus 5
parent 3385ef21e5
commit 7befe6b0c5
4 changed files with 25 additions and 42 deletions
+5 -2
View File
@@ -15,5 +15,8 @@ FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
CMD wget -qO- http://localhost/ >/dev/null || exit 1
# 127.0.0.1 statt localhost: busybox-wget loest localhost zuerst nach ::1 auf.
# Ein dauerhaft fehlschlagender Healthcheck ist hier nicht harmlos - Traefik
# nimmt Container, die nicht "healthy" sind, gar nicht in die Routing-Tabelle auf.
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1