From 60d0b0329dbcc9b80f0df0b2466293fa1fdbd38f Mon Sep 17 00:00:00 2001 From: sur1v Date: Wed, 7 Sep 2022 16:25:11 +0100 Subject: [PATCH] removed build watch and tini from container run-time --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d7b15ed..eb577661 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN yarn install --frozen-lockfile --network-timeout 1000000 COPY . ./ # Build initial app for production -RUN yarn build +RUN yarn build --mode production # Production stage FROM node:16.13.2-alpine @@ -35,8 +35,8 @@ ENV PORT=80 \ # Create and set the working directory WORKDIR ${DIRECTORY} -# Install tini for initialization and tzdata for setting timezone -RUN apk add --no-cache tzdata tini +# Update tzdata for setting timezone +RUN apk add --no-cache tzdata # Copy built application from build phase COPY --from=BUILD_IMAGE /app ./ @@ -44,8 +44,7 @@ COPY --from=BUILD_IMAGE /app ./ RUN rm dist/conf.yml # 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}