Skip to content

Commit

Permalink
update dockerfile and fix html routing
Browse files Browse the repository at this point in the history
  • Loading branch information
LepkoQQ committed Sep 10, 2024
1 parent 0852995 commit 7a5334d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion consul/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# build stage image
# ---
FROM node:14-alpine as build
FROM node:20-alpine AS build
RUN apk add --update --no-cache git

# set current directory
Expand All @@ -22,3 +22,6 @@ FROM nginx:alpine

# copy built files from the 'build' container into the nginx container
COPY --from=build /app/dist /usr/share/nginx/html

# copy custom nginx config to support routes without .html
COPY nginx.conf /etc/nginx/conf.d/default.conf
9 changes: 9 additions & 0 deletions consul/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri.html $uri/ =404;
}
}

0 comments on commit 7a5334d

Please sign in to comment.