aboutsummaryrefslogtreecommitdiff
path: root/app/jitsi/build
diff options
context:
space:
mode:
Diffstat (limited to 'app/jitsi/build')
-rw-r--r--app/jitsi/build/jitsi-xmpp/Dockerfile19
-rwxr-xr-xapp/jitsi/build/jitsi-xmpp/xmpp_gen4
-rwxr-xr-xapp/jitsi/build/jitsi-xmpp/xmpp_prosody5
-rwxr-xr-xapp/jitsi/build/jitsi-xmpp/xmpp_root4
-rwxr-xr-xapp/jitsi/build/jitsi-xmpp/xmpp_run4
5 files changed, 19 insertions, 17 deletions
diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile
index a682984..b32953a 100644
--- a/app/jitsi/build/jitsi-xmpp/Dockerfile
+++ b/app/jitsi/build/jitsi-xmpp/Dockerfile
@@ -5,15 +5,16 @@ ARG VERSION
RUN apt-get update && \
apt-get install -y prosody=${VERSION}
-mkdir -p /usr/local/share/ca-certificates/
-ln -sf \
- /var/lib/prosody/auth.jitsi.crt \
- /usr/local/share/ca-certificates/auth.jitsi.crt
+RUN mkdir -p /usr/local/share/ca-certificates/ && \
+ ln -sf \
+ /var/lib/prosody/certs/auth.jitsi.crt \
+ /usr/local/share/ca-certificates/auth.jitsi.crt && \
+ mkdir /run/prosody && \
+ touch /run/prosody/prosody.pid && \
+ mkdir -p /var/lib/prosody
-COPY xmpp_gen /usr/local/bin/xmpp_gen
-COPY xmpp_run /usr/local/bin/xmpp_run
+COPY xmpp_root /usr/local/bin/xmpp_root
+COPY xmpp_prosody /usr/local/bin/xmpp_prosody
-USER prosody
-RUN mkdir /run/prosody && touch /run/prosody/prosody.pid
WORKDIR /var/lib/prosody
-CMD ["/usr/local/bin/xmpp_run"]
+CMD ["/usr/local/bin/xmpp_root"]
diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_gen b/app/jitsi/build/jitsi-xmpp/xmpp_gen
deleted file mode 100755
index a66aad8..0000000
--- a/app/jitsi/build/jitsi-xmpp/xmpp_gen
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-prosodyctl cert generate jitsi.deuxfleurs.fr
-prosodyctl cert generate auth.jitsi.deuxfleurs.fr
diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody
new file mode 100755
index 0000000..1101302
--- /dev/null
+++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody
@@ -0,0 +1,5 @@
+#!/bin/bash
+chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody
+
+cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register
+exec prosody
diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_root b/app/jitsi/build/jitsi-xmpp/xmpp_root
new file mode 100755
index 0000000..293915f
--- /dev/null
+++ b/app/jitsi/build/jitsi-xmpp/xmpp_root
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody
+exec su -s /bin/bash -c /usr/local/bin/xmpp_prosody - prosody
diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_run b/app/jitsi/build/jitsi-xmpp/xmpp_run
deleted file mode 100755
index 81329d2..0000000
--- a/app/jitsi/build/jitsi-xmpp/xmpp_run
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-prosodyctl register focus auth.jitsi.deuxfleurs.fr ${JITSI_SECRET_JICOFO_USER}
-prosodyctl register jvb auth.jitsi.deuxfleurs.fr ${JITSI_SECRET_VIDEOBRIDGE}
-exec prosody