Bachelorthesis_Code/frontend/Dockerfile.prod
cami 5d15fbcd3d
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Use prod build for public things
2021-07-12 22:38:20 +02:00

17 lines
352 B
Docker

FROM node:latest as builder
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
RUN npm install react-scripts -g --silent
RUN npm audit fix
COPY . ./
RUN npm run build
FROM nginx:latest
COPY --from=builder /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]