fix: add nginx SPA fallback #8

Merged
mnky merged 1 commits from build/add-push-drone-pipeleine-2 into main 2026-03-09 11:51:40 +00:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 3cf3da9886 - Show all commits
+2 -1
View File
@@ -9,5 +9,6 @@ RUN npm run build
# Runtime Stage # Runtime Stage
FROM nginx:alpine FROM nginx:alpine
COPY --from=builder /app/dist/*/browser /usr/share/nginx/html COPY --from=builder /app/dist/*/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+11
View File
@@ -0,0 +1,11 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}