Copy components and store, remove in production

Needed to run tests
This commit is contained in:
Matt Rider 2019-01-04 20:42:01 -02:00
parent 11a7f0a41a
commit beac045d5f

View File

@ -14,7 +14,9 @@ RUN apk --no-cache add git
COPY locales ./locales
COPY styleguide ./styleguide
COPY server ./server
COPY package.json yarn.lock .eslintrc.js .eslintignore store/auth.test.js components/Badges.spec.js nuxt.config.js ./
COPY components ./components
COPY store ./store
COPY package.json yarn.lock .eslintrc.js .eslintignore nuxt.config.js ./
CMD ["yarn", "run", "start"]
FROM base as build-and-test
@ -27,6 +29,7 @@ RUN yarn run build
FROM base as production
ENV NODE_ENV=production
RUN rm -rf ./nitro-web/components ./nitro-web/store
COPY --from=build-and-test ./nitro-web/node_modules ./node_modules
COPY --from=build-and-test ./nitro-web/plugins ./plugins
COPY --from=build-and-test ./nitro-web/.nuxt ./.nuxt