Skip to content

Commit

Permalink
fix(docker): nginx config to redirect to index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinTh committed Mar 28, 2023
1 parent c339ab3 commit 972ffe6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ RUN pnpm build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
10 changes: 10 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}
}

0 comments on commit 972ffe6

Please sign in to comment.