ppob-frontend/Dockerfile
2022-01-28 16:26:43 +07:00

15 lines
382 B
Docker

FROM node:14-alpine as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
ARG NEXT_PUBLIC_BASE_URL
ENV REACT_APP_API_BASE_URL $NEXT_PUBLIC_BASE_URL
RUN yarn build
FROM nginx:stable-alpine
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]