Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rootless containers #2029

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e7e200a
refactor(base): upgrade s6-overlay
emrahcom Feb 21, 2025
29a9a3b
refactor(base-java): upgrade and use s6 as user
emrahcom Feb 21, 2025
e91e6c3
refactor(web): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
04c9c04
refactor(prosody): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
60a8be1
refactor(jicofo): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
81be54a
refactor(jvb): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
bd07ace
refactor(jigasi): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
c33199f
refactor(prosody): renamed as 20-saslauthd even the start order doesn…
emrahcom Feb 21, 2025
a2611bd
refactor(jibri): upgrade s6-overlay and rootless processes
emrahcom Feb 21, 2025
0fcf9c4
refactor(docker-compose.yml): use storage and tmp as writable volumes
emrahcom Feb 21, 2025
fb186c6
refactor(jibri.yml): use storage as writable volume and remove CAPS_S…
emrahcom Feb 21, 2025
4ed8899
fix(transcriber): the volume permissions
emrahcom Feb 21, 2025
96281c8
feat: Add an env var for jicofo ice failure detection. (#2028)
bgrozev Feb 21, 2025
3f98d7b
fix(prosody): update path for the renamed script
emrahcom Feb 22, 2025
a33c106
fix(jibri): --no-sandbox for pre-warm chrome
emrahcom Feb 22, 2025
ac0c8f1
refactor(base): space after >
emrahcom Feb 24, 2025
c1d97c3
refactor(base): space after >
emrahcom Feb 24, 2025
48629c8
fix(jicofo): no expected custom config files
emrahcom Feb 24, 2025
ae5d123
fix(prosody): remove the line from Dockerfile
emrahcom Feb 24, 2025
b2e00fb
fix(prosody): space after > character in Dockerfile
emrahcom Feb 24, 2025
40a990a
fix(prosody): user usermod
emrahcom Feb 24, 2025
1021067
fix(prosody): dont put pidfile into the config folder
emrahcom Feb 24, 2025
4f2e958
fix(web): remove the comment from nginx.conf
emrahcom Feb 24, 2025
724be69
fix(prosody): keep the old accounts
emrahcom Mar 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions base-java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ ARG JITSI_REPO=jitsi
ARG BASE_TAG=latest
FROM ${JITSI_REPO}/base:${BASE_TAG}

RUN mkdir -p /usr/share/man/man1 && \
mkdir -p /etc/apt/keyrings/ && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y unzip ca-certificates curl gnupg && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y nodejs openjdk-17-jre-headless openjdk-17-jdk-headless && \
apt-cleanup
USER root

COPY rootfs /

RUN \
wget -qO - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
gpg --dearmour > /usr/share/keyrings/nodesource.gpg && \
\
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y \
nodejs \
openjdk-17-jdk-headless \
openjdk-17-jre-headless \
&& \
apt-cleanup

USER s6
5 changes: 5 additions & 0 deletions base-java/rootfs/etc/apt/sources.list.d/nodejs.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Types: deb
URIs: https://deb.nodesource.com/node_20.x
Suites: nodistro
Components: main
Signed-By: /usr/share/keyrings/nodesource.gpg
87 changes: 60 additions & 27 deletions base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,73 @@
FROM docker.io/library/debian:bookworm-slim

ARG JITSI_RELEASE=stable
ARG S6_OVERLAY_VERSION=v3.2.0.2
ARG S6_OVERLAY_DOWNLOAD=https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}
ARG TPL_VERSION=v1.4.0
ARG TPL_DOWNLOAD=https://github.com/jitsi/tpl/releases/download/${TPL_VERSION}

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2

COPY rootfs /

RUN \
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
"amd64") TPL_ARCH=amd64; S6_ARCH=amd64 ;; \
"arm64") TPL_ARCH=arm64; S6_ARCH=aarch64 ;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget curl && \
wget -qO /usr/bin/tpl https://github.com/jitsi/tpl/releases/download/v1.4.0/tpl-linux-${TPL_ARCH} && \
# Workaround S6 bug when /bin is a symlink
wget -qO /tmp/s6.tar.gz https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz && \
mkdir /tmp/s6 && \
tar xfz /tmp/s6.tar.gz -C /tmp/s6 && \
tar hxfz /tmp/s6.tar.gz -C / && \
rm -f /usr/bin/execlineb && \
cp /tmp/s6/bin/execlineb /usr/bin/ && \
rm -rf /tmp/s6* && \
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | gpg --dearmour > /etc/apt/trusted.gpg.d/jitsi.gpg && \
echo "deb https://download.jitsi.org $JITSI_RELEASE/" > /etc/apt/sources.list.d/jitsi.list && \
echo "deb http://ftp.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get dist-upgrade -y && \
apt-cleanup && \
chmod +x /usr/bin/tpl
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
"amd64") TPL_ARCH=amd64; S6_ARCH=x86_64 ;; \
"arm64") TPL_ARCH=arm64; S6_ARCH=aarch64 ;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
\
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y \
apt-utils \
ca-certificates \
curl \
gnupg \
wget \
&& \
apt-dpkg-wrap apt-get install -y \
xz-utils \
&& \
\
wget -qO /usr/bin/tpl ${TPL_DOWNLOAD}/tpl-linux-${TPL_ARCH} && \
chmod +x /usr/bin/tpl && \
mkdir /tmp/s6 && \
wget -qO /tmp/s6/s6-overlay-noarch.tar.xz \
${S6_OVERLAY_DOWNLOAD}/s6-overlay-noarch.tar.xz && \
wget -qO /tmp/s6/s6-overlay-${S6_ARCH}.tar.xz \
${S6_OVERLAY_DOWNLOAD}/s6-overlay-${S6_ARCH}.tar.xz && \
tar -C / -Jxpf /tmp/s6/s6-overlay-noarch.tar.xz && \
tar -C / -Jxpf /tmp/s6/s6-overlay-${S6_ARCH}.tar.xz && \
rm -rf /tmp/s6 && \
\
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | \
gpg --dearmour > /usr/share/keyrings/jitsi.gpg && \
sed -i "s/stable/${JITSI_RELEASE}/" /etc/apt/sources.list.d/jitsi.sources && \
\
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get dist-upgrade -y && \
apt-get purge -y \
xz-utils \
&& \
apt-cleanup && \
\
adduser --disabled-password --gecos "" s6

RUN [ "$JITSI_RELEASE" = "unstable" ] && \
RUN \
[ "${JITSI_RELEASE}" = "unstable" ] && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y jq procps curl vim iputils-ping net-tools && \
apt-cleanup || \
apt-dpkg-wrap apt-get install -y \
jq \
iputils-ping \
net-tools \
procps \
vim \
&& \
apt-cleanup \
|| \
true

USER s6

ENTRYPOINT [ "/init" ]
5 changes: 5 additions & 0 deletions base/rootfs/etc/apt/sources.list.d/backports.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Types: deb
URIs: https://deb.debian.org/debian
Suites: bookworm-backports
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
5 changes: 5 additions & 0 deletions base/rootfs/etc/apt/sources.list.d/jitsi.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Types: deb
URIs: https://download.jitsi.org
Suites: stable/
Components:
Signed-By: /usr/share/keyrings/jitsi.gpg
10 changes: 0 additions & 10 deletions base/rootfs/etc/cont-init.d/01-set-timezone

This file was deleted.

3 changes: 3 additions & 0 deletions base/rootfs/usr/bin/apt-cleanup
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/sh

apt-get autopurge -y
apt-get clean

rm -rf /var/lib/apt/lists/
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ services:
- '${HTTPS_PORT}:443'
volumes:
- ${CONFIG}/web:/config:Z
- ${CONFIG}/web/crontabs:/var/spool/cron/crontabs:Z
- ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z
- ${CONFIG}/web/load-test:/usr/share/jitsi-meet/load-test:Z
- ${CONFIG}/storage/transcripts:/usr/share/jitsi-meet/transcripts:ro,z
- ${CONFIG}/tmp/web-crontabs:/var/spool/cron/crontabs:Z
- ${CONFIG}/tmp/web-load-test:/usr/share/jitsi-meet/load-test:Z
labels:
service: "jitsi-web"
environment:
Expand Down Expand Up @@ -203,6 +203,7 @@ services:
volumes:
- ${CONFIG}/prosody/config:/config:Z
- ${CONFIG}/prosody/prosody-plugins-custom:/prosody-plugins-custom:Z
- ${CONFIG}/storage/prosody:/var/lib/prosody:Z
environment:
- AUTH_TYPE
- DISABLE_POLLS
Expand Down Expand Up @@ -383,6 +384,7 @@ services:
- JICOFO_CONF_STRIP_SIMULCAST
- JICOFO_CONF_SSRC_REWRITING
- JICOFO_ENABLE_HEALTH_CHECKS
- JICOFO_ENABLE_ICE_FAILURE_DETECTION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased my branch before creating PR to not conflict with master. This comes from the master branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you need to rebase again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and nothing is updated.
I think it is OK.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, can you simply drop the commit when rebasing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

It is already rebased and the changes on master (during the PR development) are applied to my branch. PR should be mergable without any problem, I think. What am I missing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you rebase the branch with current master the commit shouldn't show up. I will want to squash-merge this, and I want to limit the chance for conflicts, that's all :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I still didn't understand.

I synchronized my cloned repo with the official repo. Their master are the same.
Then I rebased my branch with the current master. This is what I get at the end.

I didn't add JICOFO_ENABLE_ICE_FAILURE_DETECTION line manually. It came from the previous rebase. And if I rebase again, the command completes without any additinal changes.

- JICOFO_ENABLE_REST
- JICOFO_HEALTH_CHECKS_USE_PRESENCE
- JICOFO_MAX_MEMORY
Expand Down
3 changes: 1 addition & 2 deletions jibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ services:
restart: ${RESTART_POLICY:-unless-stopped}
volumes:
- ${CONFIG}/jibri:/config:Z
- ${CONFIG}/storage/jibri:/storage:Z
shm_size: '2gb'
cap_add:
- SYS_ADMIN
environment:
- AUTOSCALER_SIDECAR_KEY_FILE
- AUTOSCALER_SIDECAR_KEY_ID
Expand Down
73 changes: 46 additions & 27 deletions jibri/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ARG JITSI_REPO=jitsi
ARG BASE_TAG=latest
FROM ${JITSI_REPO}/base-java:${BASE_TAG}

USER root

LABEL org.opencontainers.image.title="Jitsi Broadcasting Infrastructure (jibri)"
LABEL org.opencontainers.image.description="Components for recording and/or streaming a conference."
LABEL org.opencontainers.image.url="https://github.com/jitsi/jibri"
Expand All @@ -15,32 +17,49 @@ ARG CHROME_RELEASE=130.0.6723.116

COPY rootfs/ /

RUN apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
jibri \
libgl1-mesa-dri \
procps \
jitsi-upload-integrations \
jitsi-autoscaler-sidecar \
jq \
pulseaudio \
dbus \
dbus-x11 \
rtkit \
unzip \
fonts-noto \
fonts-noto-cjk \
libcap2-bin && \
/usr/bin/install-chrome.sh && \
apt-cleanup && \
adduser jibri rtkit && \
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
"amd64") SC_ARCH=x86_64 ;; \
"arm64") SC_ARCH=aarch64 ;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
wget -qO /usr/bin/shm-check https://github.com/saghul/shm-check/releases/download/v1.0.0/shm-check-${SC_ARCH} && \
chmod +x /usr/bin/shm-check
RUN \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
dbus \
dbus-x11 \
fonts-noto \
fonts-noto-cjk \
jibri \
jitsi-autoscaler-sidecar \
jitsi-upload-integrations \
jq \
libcap2-bin \
libgl1-mesa-dri \
procps \
pulseaudio \
rtkit \
unzip \
&& \
/usr/bin/install-chrome.sh && \
apt-get purge -y \
unzip \
&& \
apt-cleanup && \
\
rm -rf /etc/jitsi/jibri && \
ln -s /run/jibri/config /etc/jitsi/jibri && \
\
usermod -a -G audio,jibri,jitsi,rtkit,video s6 && \
cp -r /home/jibri/. /home/s6 && \
rm -rf /home/jibri && \
ln -s /run/tmp/s6-config /home/s6/.config && \
ln -s /run/tmp/s6-local /home/s6/.local && \
chown s6:s6 /home/s6 -R && \
\
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
"amd64") SC_ARCH=x86_64 ;; \
"arm64") SC_ARCH=aarch64 ;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
wget -qO /usr/bin/shm-check https://github.com/saghul/shm-check/releases/download/v1.0.0/shm-check-${SC_ARCH} && \
chmod +x /usr/bin/shm-check

VOLUME /config

USER s6
3 changes: 2 additions & 1 deletion jibri/rootfs/defaults/jibri.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jibri {
{{ end -}}
}
recording {
recordings-directory = "{{ .Env.JIBRI_RECORDING_DIR | default "/config/recordings" }}"
recordings-directory = "{{ .Env.JIBRI_RECORDING_DIR | default "/storage/recordings" }}"
{{ if .Env.JIBRI_FINALIZE_RECORDING_SCRIPT_PATH -}}
finalize-script = "{{ .Env.JIBRI_FINALIZE_RECORDING_SCRIPT_PATH }}"
{{ end -}}
Expand Down Expand Up @@ -73,6 +73,7 @@ jibri {
"--kiosk",
"--enabled",
"--autoplay-policy=no-user-gesture-required",
"--no-sandbox",
"--ignore-certificate-errors"
]
}
Expand Down
8 changes: 4 additions & 4 deletions jibri/rootfs/defaults/logging.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler
org.jitsi.utils.logging2.JitsiLogFormatter.programname=Jibri

java.util.logging.FileHandler.level = FINE
java.util.logging.FileHandler.pattern = /config/logs/log.%g.txt
java.util.logging.FileHandler.pattern = /storage/logs/log.%g.txt
java.util.logging.FileHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
java.util.logging.FileHandler.count = 10
java.util.logging.FileHandler.limit = 10000000

org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.level = FINE
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.pattern = /config/logs/ffmpeg.%g.txt
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.pattern = /storage/logs/ffmpeg.%g.txt
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.count = 10
org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.limit = 10000000

org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.level = FINE
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.pattern = /config/logs/pjsua.%g.txt
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.pattern = /storage/logs/pjsua.%g.txt
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.count = 10
org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.limit = 10000000

org.jitsi.jibri.selenium.util.BrowserFileHandler.level = FINE
org.jitsi.jibri.selenium.util.BrowserFileHandler.pattern = /config/logs/browser.%g.txt
org.jitsi.jibri.selenium.util.BrowserFileHandler.pattern = /storage/logs/browser.%g.txt
org.jitsi.jibri.selenium.util.BrowserFileHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter
org.jitsi.jibri.selenium.util.BrowserFileHandler.count = 10
org.jitsi.jibri.selenium.util.BrowserFileHandler.limit = 10000000
Expand Down
2 changes: 0 additions & 2 deletions jibri/rootfs/etc/fix-attrs.d/10-jibri

This file was deleted.

1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/01-config/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/01-config/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/scripts/config
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/10-xorg/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/xorg
1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/10-xorg/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/20-icewm/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/icewm
1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/20-icewm/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/30-pulse/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/pulse
1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/30-pulse/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/40-jibri/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/jibri-finish
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/40-jibri/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/jibri
1 change: 1 addition & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/40-jibri/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
3 changes: 3 additions & 0 deletions jibri/rootfs/etc/s6-overlay/s6-rc.d/50-autoscaler-sidecar/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/command/execlineb -P

/etc/s6-overlay/scripts/autoscaler-sidecar
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions jibri/rootfs/etc/s6-overlay/scripts/autoscaler-sidecar
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/command/with-contenv bash

if [[ -n "$AUTOSCALER_URL" ]] && [[ -f "/run/autoscaler-sidecar/config" ]]; then
DAEMON="/usr/bin/node /usr/share/jitsi-autoscaler-sidecar/app.js"
exec /bin/bash -c ". /run/autoscaler-sidecar/config && exec $DAEMON"
else
# if autoscaler-sidecar should not be started,
# prevent s6 from restarting this script again and again
s6-svc -O /run/service/50-autoscaler-sidecar
fi
Loading