Skip to content

Commit

Permalink
multi
Browse files Browse the repository at this point in the history
  • Loading branch information
n0th1ng-else committed Jan 20, 2024
1 parent 2e76ec5 commit 4c4e331
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM node:20.11.0 AS builder

ENV NODE_ENV production

USER root

ARG APP_DIR=/usr/src/app/

RUN mkdir -p "$APP_DIR"
Expand All @@ -20,8 +18,6 @@ FROM node:20.11.0

EXPOSE 8080

USER node

ENV NEW_RELIC_NO_CONFIG_FILE true

ENV NODE_ENV production
Expand All @@ -31,15 +27,17 @@ ENV APP_VERSION ${APP_VERSION}

RUN echo ${APP_VERSION}

ARG APP_DIR=/usr/src/app/
# ARG APP_DIR=/usr/src/app/
#
# RUN mkdir -p "$APP_DIR"
# WORKDIR $APP_DIR
#
# COPY --from=builder $APP_DIR/package.json $APP_DIR
# COPY --from=builder $APP_DIR/package-lock.json $APP_DIR
# RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force
#
# COPY --from=builder $APP_DIR/dist $APP_DIR/dist

RUN mkdir -p "$APP_DIR"
WORKDIR $APP_DIR

COPY --from=builder $APP_DIR/package.json $APP_DIR
COPY --from=builder $APP_DIR/package-lock.json $APP_DIR
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force

COPY --from=builder $APP_DIR/dist $APP_DIR/dist
USER node

CMD ["npm", "run", "cluster:js"]

0 comments on commit 4c4e331

Please sign in to comment.