Skip to content

Commit

Permalink
removed build watch and tini from container run-time
Browse files Browse the repository at this point in the history
  • Loading branch information
sur1v committed Sep 7, 2022
1 parent 8d300d4 commit 60d0b03
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,17 +35,16 @@ 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 ./
# Ensure only one version of conf.yml exists
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}
Expand Down

0 comments on commit 60d0b03

Please sign in to comment.