Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Murzbul committed Dec 19, 2022
1 parent c90026d commit fbf9580
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN wget --no-check-certificate https://storage.googleapis.com/downloads.webmpro
cd .. && \
rm -rf libwebp-1.0.0 libwebp-1.0.0.tar.gz

RUN npm install --location=global pnpm

WORKDIR /usr/app

COPY --chown=node:node src ./src
Expand Down Expand Up @@ -48,8 +50,6 @@ USER node

RUN pnpm build

RUN ls -l

FROM build as prerelease

WORKDIR /usr/app
Expand All @@ -69,16 +69,12 @@ RUN npm install --location=global pm2
WORKDIR /usr/app

# Copy js files and change ownership to user node
COPY --from=prerelease --chown=node:node /usr/app/package.json ./
COPY --from=prerelease --chown=node:node /usr/app/pnpm-lock.yaml ./
COPY --from=prerelease --chown=node:node /usr/app/ecosystem.config.js/ ./
COPY --chown=node:node package.json pnpm-lock.yaml ecosystem.config.js ./
COPY --from=prerelease --chown=node:node /usr/app/node_modules/ ./node_modules/
COPY --from=prerelease --chown=node:node /usr/app/dist/ ./dist/
COPY --from=prerelease --chown=node:node /usr/app/config/ ./config/
COPY --from=prerelease --chown=node:node /usr/app/.env/ ./.env



USER node

ENTRYPOINT ["dumb-init", "pm2-runtime", "start", "ecosystem.config.js"]

0 comments on commit fbf9580

Please sign in to comment.