first commit
This commit is contained in:
25
mod/webhooks/Dockerfile
Normal file
25
mod/webhooks/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM node:14.18.3-bullseye-slim AS builder
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y git wget
|
||||
|
||||
RUN wget -q https://github.com/mikefarah/yq/releases/download/v4.25.1/yq_linux_amd64 -O /usr/bin/yq \
|
||||
&& chmod +x /usr/bin/yq
|
||||
|
||||
COPY ./bbb-webhooks /bbb-webhooks
|
||||
RUN cd /bbb-webhooks && npm install --production
|
||||
|
||||
RUN chmod 777 /bbb-webhooks/config
|
||||
# ------------------------------
|
||||
|
||||
FROM node:14.18.3-bullseye-slim
|
||||
RUN useradd --uid 2004 --user-group bbb-webhooks
|
||||
|
||||
COPY --from=builder /usr/bin/yq /usr/bin/yq
|
||||
COPY --from=builder /bbb-webhooks /bbb-webhooks
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN mkdir /bbb-webhooks/log && chmod 777 /bbb-webhooks/log
|
||||
USER bbb-webhooks
|
||||
ENTRYPOINT /entrypoint.sh
|
||||
|
||||
17
mod/webhooks/entrypoint.sh
Executable file
17
mod/webhooks/entrypoint.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
TARGET=/bbb-webhooks/config/production.yml
|
||||
cp /bbb-webhooks/config/default.example.yml $TARGET
|
||||
|
||||
yq e -i ".bbb.sharedSecret = \"$SHARED_SECRET\"" $TARGET
|
||||
yq e -i ".bbb.serverDomain = \"$DOMAIN\"" $TARGET
|
||||
yq e -i ".bbb.auth2_0 = true" $TARGET
|
||||
yq e -i ".server.bind = \"0.0.0.0\"" $TARGET
|
||||
yq e -i ".hooks.getRaw = false" $TARGET
|
||||
yq e -i ".redis.host = \"redis\"" $TARGET
|
||||
|
||||
export NODE_ENV=production
|
||||
|
||||
cd /bbb-webhooks
|
||||
node app.js
|
||||
|
||||
Reference in New Issue
Block a user