From 9c35fe40276ec4b0c19de9847c21a4429913d30c Mon Sep 17 00:00:00 2001 From: aterox Date: Sun, 6 Mar 2022 03:22:54 -0500 Subject: [PATCH] Change CMD and copy only dist, not dist and public --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ebb6f41c..f2b0029f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,11 +39,15 @@ WORKDIR ${DIRECTORY} RUN apk add --no-cache tzdata tini # Copy built application from build phase -COPY --from=BUILD_IMAGE /app ./ +COPY --from=BUILD_IMAGE /app/dist/ public/ +COPY --from=BUILD_IMAGE /app/node_modules/ node_modules/ +COPY services/ services/ +COPY src/utils/ src/utils/ +COPY package.json yarn.lock server.js ./ # Finally, run start command to serve up the built application ENTRYPOINT [ "/sbin/tini", "--" ] -CMD [ "yarn", "build-and-start" ] +CMD [ "yarn", "start" ] # Expose the port EXPOSE ${PORT}