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
commit b974707968
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ RUN npm run build
FROM nginx:alpine
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 80