2020-02-09 13:31:09 +00:00
|
|
|
FROM node:10-buster-slim as build-stage
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json .
|
|
|
|
RUN yarn install --pure-lockfile \
|
|
|
|
&& yarn cache clean
|
|
|
|
|
2020-02-14 01:15:56 +00:00
|
|
|
# TODO: copy only the required files here
|
2020-02-09 13:31:09 +00:00
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN yarn run build
|
|
|
|
|
|
|
|
|
|
|
|
FROM nginx as production-stage
|
|
|
|
RUN mkdir /app
|
|
|
|
COPY --from=build-stage /app/dist /app
|
2020-02-09 13:35:18 +00:00
|
|
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|