move installation command to build step

This commit is contained in:
hexboy 2024-08-15 19:47:04 +03:30
parent 670acedcaf
commit e199f3eed1

View file

@ -25,8 +25,11 @@ USER node
# Copy the rest of the source files into the image.
COPY --chown=node . .
# Install packages
RUN yarn workspaces focus --production && yarn cache clean
# Expose the port that the application listens on.
EXPOSE 8008
# Run the application.
CMD yarn workspaces focus --production && yarn run pm2 start --attach --env ${NODE_ENV}
ENTRYPOINT ["yarn", "run", "pm2", "start", "--attach", "--env", "${NODE_ENV}"]