-
-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds simple Dockerfile and docker-compose
- Loading branch information
1 parent
4bf9230
commit 3b67a94
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.git | ||
.github | ||
.hust | ||
*.tgz | ||
dist | ||
log | ||
node_modules | ||
npm-debug.log | ||
tokens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM node:14-alpine as base | ||
WORKDIR /usr/src/wpp-server | ||
ENV NODE_ENV=production PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --production --pure-lockfile && \ | ||
yarn cache clean | ||
|
||
FROM base as build | ||
WORKDIR /usr/src/wpp-server | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --production=false --pure-lockfile && \ | ||
yarn cache clean | ||
COPY . . | ||
RUN yarn build | ||
|
||
|
||
FROM base | ||
WORKDIR /usr/src/wpp-server/ | ||
RUN apk add --no-cache chromium | ||
RUN yarn cache clean | ||
COPY . . | ||
COPY --from=build /usr/src/wpp-server/ /usr/src/wpp-server/ | ||
EXPOSE 21465 | ||
ENTRYPOINT ["node", "dist/server.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3.4" | ||
|
||
volumes: | ||
wppconnect_tokens: {} | ||
|
||
services: | ||
wppconnect: | ||
build: | ||
context: . | ||
volumes: | ||
- ./config.json:/usr/src/wpp-server/config.json | ||
- wppconnect_tokens:/usr/src/wpp-server/tokens | ||
ports: | ||
- "21465:21465" |