Skip to content

Commit

Permalink
change workdir & node version
Browse files Browse the repository at this point in the history
  • Loading branch information
hafiziruslan committed Aug 5, 2024
1 parent b64b066 commit 01d87ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:lts-alpine3.18 as base
WORKDIR /usr/src/wpp-server
FROM node:lts-alpine as base
WORKDIR /usr/wpp-server
ENV NODE_ENV=production PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
COPY package.json ./
RUN apk update && \
Expand All @@ -16,7 +16,7 @@ RUN yarn install --production --pure-lockfile && \
yarn cache clean

FROM base as build
WORKDIR /usr/src/wpp-server
WORKDIR /usr/wpp-server
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
COPY package.json ./
RUN yarn install --production=false --pure-lockfile
Expand All @@ -25,10 +25,10 @@ COPY . .
RUN yarn build

FROM base
WORKDIR /usr/src/wpp-server/
WORKDIR /usr/wpp-server
RUN apk add --no-cache chromium
RUN yarn cache clean
COPY . .
COPY --from=build /usr/src/wpp-server/ /usr/src/wpp-server/
COPY --from=build /usr/wpp-server/ /usr/wpp-server/
EXPOSE 21465
ENTRYPOINT ["node", "dist/server.js"]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
build:
context: .
volumes:
- ./config.ts:/usr/src/wpp-server/dist/config.js
- ./tokens:/usr/src/wpp-server/tokens
- ./config.ts:/usr/wpp-server/dist/config.js
- ./tokens:/usr/wpp-server/tokens
ports:
- '21465:21465'

0 comments on commit 01d87ca

Please sign in to comment.