add nginx.conf

This commit is contained in:
2024-09-22 14:29:26 +02:00
parent b6e0c6eb31
commit 94e0cedd63
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ RUN npm run build-only
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+18
View File
@@ -0,0 +1,18 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html; # Redirect all non-static routes to index.html
}
error_page 404 /index.html;
location = /index.html {
root /usr/share/nginx/html;
}
}