Patch nginx config in Docker image to fix SPA routing

This commit is contained in:
Fifo F.
2025-06-25 21:46:05 +02:00
committed by GitHub
parent d25f7ca557
commit b974707968

View File

@@ -11,6 +11,7 @@ RUN npm run build
FROM nginx:alpine FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
RUN sed -i 's|index index.html index.htm;|index index.html index.htm;\n try_files $uri $uri/ /index.html;|' /etc/nginx/conf.d/default.conf
# Expose port 80 # Expose port 80
EXPOSE 80 EXPOSE 80