Stabilisiere Docs-Auslieferung unter /docs mit Traefik StripPrefix
Some checks failed
Build and Push Docker Images / verify-docs-sync (push) Successful in 7s
Build and Push Docker Images / build-backend (push) Successful in 15s
Build and Push Docker Images / build-docs (push) Failing after 41s
Build and Push Docker Images / build-frontend (push) Successful in 14s

This commit is contained in:
2026-04-22 16:06:02 +02:00
parent 1908a6441d
commit 4882da0d35
3 changed files with 4 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ services:
- "traefik.port=80"
# Middlewares
- "traefik.http.middlewares.fedeo-docs-redirect-web-secure.redirectscheme.scheme=https"
- "traefik.http.middlewares.fedeo-docs-strip.stripprefix.prefixes=/docs"
# Web Entrypoint
- "traefik.http.routers.fedeo-docs.middlewares=fedeo-docs-redirect-web-secure"
- "traefik.http.routers.fedeo-docs.rule=Host(`app.fedeo.de`) && PathPrefix(`/docs`)"
@@ -43,6 +44,7 @@ services:
- "traefik.http.routers.fedeo-docs-secure.rule=Host(`app.fedeo.de`) && PathPrefix(`/docs`)"
- "traefik.http.routers.fedeo-docs-secure.entrypoints=web-secured"
- "traefik.http.routers.fedeo-docs-secure.tls.certresolver=mytlschallenge"
- "traefik.http.routers.fedeo-docs-secure.middlewares=fedeo-docs-strip"
- "traefik.http.routers.fedeo-docs-secure.priority=120"
backend:
image: git.federspiel.tech/flfeders/fedeo/backend:dev

View File

@@ -11,7 +11,7 @@ RUN npm run build
FROM nginx:1.27-alpine AS runner
COPY docs-site/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/docs-site/build /usr/share/nginx/html
COPY --from=builder /app/docs-site/build/docs /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -5,12 +5,8 @@ server {
root /usr/share/nginx/html;
index index.html;
location = /docs {
return 301 /docs/;
}
location / {
try_files $uri $uri/ /docs/index.html /index.html;
try_files $uri $uri/ /index.html;
}
location ~* \.(?:css|js|map|jpg|jpeg|gif|png|svg|ico|webp|woff2?)$ {