Files
ScoutingApp2022/webserver/Dockerfile.prod
T

18 lines
421 B
Docker
Raw Normal View History

2022-01-08 12:52:39 -07:00
FROM node:16-alpine as build-step
RUN mkdir /app/
WORKDIR /app/
ENV PATH /app/node_modules/.bin:$PATH
2022-02-02 23:23:43 -07:00
RUN chown -R node:node /app/node_modules
2022-01-08 12:52:39 -07:00
COPY package*.json ./
RUN npm install
COPY . ./
# USER node
RUN npm run build
FROM nginx:1-alpine
COPY --from=build-step /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]