Add Signal and Whatsapp Docker CI
This commit is contained in:
parent
b8ff61265b
commit
6305a8b0bc
12 changed files with 99 additions and 8 deletions
38
apps/bridge-whatsapp/Dockerfile
Normal file
38
apps/bridge-whatsapp/Dockerfile
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
FROM node:20-bookworm AS base
|
||||
|
||||
FROM base AS builder
|
||||
ARG APP_DIR=/opt/bridge-whatsapp
|
||||
RUN mkdir -p ${APP_DIR}/
|
||||
RUN npm i -g turbo
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY . .
|
||||
RUN turbo prune --scope=bridge-whatsapp --docker
|
||||
|
||||
FROM base AS installer
|
||||
ARG APP_DIR=/opt/bridge-whatsapp
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY --from=builder ${APP_DIR}/out/json/ .
|
||||
COPY --from=builder ${APP_DIR}/out/full/ .
|
||||
COPY --from=builder ${APP_DIR}/out/package-lock.json ./package-lock.json
|
||||
RUN npm ci
|
||||
RUN npm i -g turbo
|
||||
RUN turbo run build --filter=bridge-whatsapp
|
||||
|
||||
FROM base as runner
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG APP_DIR=/opt/bridge-whatsapp
|
||||
RUN mkdir -p ${APP_DIR}/
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
dumb-init
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY --from=installer ${APP_DIR} ./
|
||||
RUN chown -R node:node ${APP_DIR}
|
||||
WORKDIR ${APP_DIR}/apps/bridge-whatsapp/
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
USER node
|
||||
EXPOSE 5000
|
||||
ENV PORT 5000
|
||||
ENV NODE_ENV production
|
||||
ENTRYPOINT ["/opt/bridge-whatsapp/apps/bridge-whatsapp/docker-entrypoint.sh"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue