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>
23 lines
857 B
Docker
23 lines
857 B
Docker
# --- Build ------------------------------------------------------------------
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY tsconfig.json vite.config.ts index.html ./
|
|
COPY src ./src
|
|
COPY public ./public
|
|
RUN npm run build
|
|
|
|
# --- Laufzeit ---------------------------------------------------------------
|
|
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
|
|
# 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
|