2021-01-07 15:03:29 +00:00
|
|
|
FROM node:14.5.0-alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM nginx:alpine as app
|
2021-01-22 12:27:23 +00:00
|
|
|
# fix nginx root location
|
|
|
|
RUN sed -i 's|index index.html index.htm;|try_files $uri /index.html;|g' /etc/nginx/conf.d/default.conf
|
2021-01-07 15:03:29 +00:00
|
|
|
COPY --from=build /app/build/ /usr/share/nginx/html/
|