🔀 Merge pull request #891 from sur1v/master
Removed build watch and tini from container run-time
This commit is contained in:
@@ -22,7 +22,7 @@ RUN yarn install --frozen-lockfile --network-timeout 1000000
|
|||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
# Build initial app for production
|
# Build initial app for production
|
||||||
RUN yarn build
|
RUN yarn build --mode production
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:16.13.2-alpine
|
FROM node:16.13.2-alpine
|
||||||
@@ -35,8 +35,8 @@ ENV PORT=80 \
|
|||||||
# Create and set the working directory
|
# Create and set the working directory
|
||||||
WORKDIR ${DIRECTORY}
|
WORKDIR ${DIRECTORY}
|
||||||
|
|
||||||
# Install tini for initialization and tzdata for setting timezone
|
# Update tzdata for setting timezone
|
||||||
RUN apk add --no-cache tzdata tini
|
RUN apk add --no-cache tzdata
|
||||||
|
|
||||||
# Copy built application from build phase
|
# Copy built application from build phase
|
||||||
COPY --from=BUILD_IMAGE /app ./
|
COPY --from=BUILD_IMAGE /app ./
|
||||||
@@ -44,8 +44,7 @@ COPY --from=BUILD_IMAGE /app ./
|
|||||||
RUN rm dist/conf.yml
|
RUN rm dist/conf.yml
|
||||||
|
|
||||||
# Finally, run start command to serve up the built application
|
# Finally, run start command to serve up the built application
|
||||||
ENTRYPOINT [ "/sbin/tini", "--" ]
|
CMD [ "yarn", "start" ]
|
||||||
CMD [ "yarn", "build-and-start" ]
|
|
||||||
|
|
||||||
# Expose the port
|
# Expose the port
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
|||||||
Reference in New Issue
Block a user