18 lines
343 B
Docker
18 lines
343 B
Docker
|
FROM node:16-alpine as build
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY ./client/ /app/
|
||
|
|
||
|
# prepare for build
|
||
|
RUN npm install --silent
|
||
|
RUN npm run build
|
||
|
|
||
|
# now, start nginx
|
||
|
|
||
|
FROM nginx
|
||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||
|
COPY ./nginx/nginx.prod.conf /etc/nginx/conf.d/nginx.conf
|
||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||
|
|
||
|
CMD ["nginx", "-g", "daemon off;"]
|