diff --git a/backend/Dockerfile b/backend/Dockerfile index fcb978810..b1cd52b30 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -75,12 +75,13 @@ FROM base as production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/dist ./dist +COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules # Copy static files # TODO - externalize the uploads so we can copy the whole folder COPY --from=build ${DOCKER_WORKDIR}/public/img/ ./public/img/ COPY --from=build ${DOCKER_WORKDIR}/public/providers.json ./public/providers.json -# yarn install -RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache +# Copy package.json for script definitions (lock file should not be needed) +COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json # Run command CMD /bin/sh -c "yarn run start" \ No newline at end of file diff --git a/webapp/Dockerfile b/webapp/Dockerfile index d6b186e1e..a82e51f94 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -75,14 +75,15 @@ FROM base as production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/.nuxt ./.nuxt -COPY --from=build ${DOCKER_WORKDIR}/nuxt.config.js ./ +COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules +COPY --from=build ${DOCKER_WORKDIR}/nuxt.config.js ./nuxt.config.js # Copy static files # TODO - this should be one Folder containign all stuff needed to be copied COPY --from=build ${DOCKER_WORKDIR}/constants ./constants COPY --from=build ${DOCKER_WORKDIR}/static ./static COPY --from=build ${DOCKER_WORKDIR}/locales ./locales -# yarn install -RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache +# Copy package.json for script definitions (lock file should not be needed) +COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json # Run command CMD /bin/sh -c "yarn run start" \ No newline at end of file