2020-02-15 15:28:21 +00:00
|
|
|
FROM node:13-alpine as build-stage
|
2020-02-09 13:31:09 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json .
|
|
|
|
RUN yarn install --pure-lockfile \
|
|
|
|
&& yarn cache clean
|
|
|
|
|
2020-02-15 15:28:21 +00:00
|
|
|
COPY src/ src/
|
|
|
|
COPY public/ public/
|
|
|
|
COPY yarn.lock .
|
|
|
|
COPY .eslintrc.js .
|
2020-02-09 13:31:09 +00:00
|
|
|
|
2020-02-15 15:28:21 +00:00
|
|
|
# TODO: the build works fine with only the above files, does that mean we can delete everything else?
|
|
|
|
|
|
|
|
#COPY vue.config.js .
|
|
|
|
#COPY postcss.config.js .
|
|
|
|
#COPY .eslintrc .
|
2020-02-09 13:31:09 +00:00
|
|
|
|
2020-02-15 15:28:21 +00:00
|
|
|
RUN yarn run build
|
2020-02-09 13:31:09 +00:00
|
|
|
|
|
|
|
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
|