Bachelorthesis_Code/frontend/Dockerfile.prod
cami d28964dd1f
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
added nginx back :-)
2021-07-13 00:38:46 +02:00

15 lines
365 B
Docker

FROM node:latest as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
COPY . ./
RUN npm run build
FROM nginx:latest
COPY --from=build /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;"]