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:
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user