commit
77fed7d180
3 changed files with 33 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
FROM node:lts-alpine as build-stage |
|||
WORKDIR /app |
|||
COPY src/package*.json ./ |
|||
RUN npm install |
|||
COPY src/. . |
|||
RUN rm -rf dist/ |
|||
RUN npm run build |
|||
|
|||
FROM nginx:stable-alpine as production-stage |
|||
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf |
|||
COPY --from=build-stage /app/dist /usr/share/nginx/html |
|||
EXPOSE 80 |
|||
CMD ["nginx", "-g", "daemon off;"] |
@ -0,0 +1,19 @@ |
|||
server { |
|||
listen 80; |
|||
server_name localhost; |
|||
|
|||
error_page 404 /custom.html; |
|||
|
|||
location /{ |
|||
root /usr/share/nginx/html; |
|||
index index.html index.htm; |
|||
include /etc/nginx/mime.types; |
|||
} |
|||
|
|||
location /custom.html{ |
|||
root /usr/share/nginx/html; |
|||
index index.html index.htm; |
|||
include /etc/nginx/mime.types; |
|||
try_files $uri $uri/ /index.html; |
|||
} |
|||
} |
Loading…
Reference in new issue