From 7b57ff72a918ca295e2b00e76da33eec700c6a2a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 17:52:41 +0100 Subject: Simplify prosody too --- app/jitsi/build/jitsi-xmpp/Dockerfile | 10 ++++- .../build/jitsi-xmpp/external_components.cfg.lua | 2 - app/jitsi/build/jitsi-xmpp/xmpp_conf | 49 ---------------------- app/jitsi/build/jitsi-xmpp/xmpp_gen | 5 --- app/jitsi/build/jitsi-xmpp/xmpp_run | 18 +------- 5 files changed, 9 insertions(+), 75 deletions(-) delete mode 100644 app/jitsi/build/jitsi-xmpp/external_components.cfg.lua delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_conf (limited to 'app/jitsi/build/jitsi-xmpp') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index f3dcd36..a682984 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -5,9 +5,15 @@ ARG VERSION RUN apt-get update && \ apt-get install -y prosody=${VERSION} -COPY external_components.cfg.lua /etc/prosody/conf.d/external_components.cfg.lua -COPY xmpp_conf /usr/local/bin/xmpp_conf +mkdir -p /usr/local/share/ca-certificates/ +ln -sf \ + /var/lib/prosody/auth.jitsi.crt \ + /usr/local/share/ca-certificates/auth.jitsi.crt + COPY xmpp_gen /usr/local/bin/xmpp_gen COPY xmpp_run /usr/local/bin/xmpp_run +USER prosody +RUN mkdir /run/prosody && touch /run/prosody/prosody.pid +WORKDIR /var/lib/prosody CMD ["/usr/local/bin/xmpp_run"] diff --git a/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua b/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua deleted file mode 100644 index beaaa87..0000000 --- a/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua +++ /dev/null @@ -1,2 +0,0 @@ -component_ports = { 5347 } -component_interface = "0.0.0.0" diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_conf b/app/jitsi/build/jitsi-xmpp/xmpp_conf deleted file mode 100755 index 34b2cb3..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_conf +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -cat >> /etc/hosts < /etc/prosody/conf.avail/jitsi.deuxfleurs.fr.cfg.lua < Date: Thu, 28 Jan 2021 18:55:56 +0100 Subject: WIP integration jitsi --- app/jitsi/build/jitsi-xmpp/Dockerfile | 19 ++++++++++--------- app/jitsi/build/jitsi-xmpp/xmpp_gen | 4 ---- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 5 +++++ app/jitsi/build/jitsi-xmpp/xmpp_root | 4 ++++ app/jitsi/build/jitsi-xmpp/xmpp_run | 4 ---- 5 files changed, 19 insertions(+), 17 deletions(-) delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_gen create mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_prosody create mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_root delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_run (limited to 'app/jitsi/build/jitsi-xmpp') 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 -- cgit v1.2.3 From 0e848bb2d0e705e5e0858fe8f2c02a3c9c8f45e5 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 19:28:15 +0100 Subject: Polished prosody --- app/jitsi/build/jitsi-xmpp/Dockerfile | 15 +++++++++++---- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 2 -- app/jitsi/build/jitsi-xmpp/xmpp_root | 4 ---- 3 files changed, 11 insertions(+), 10 deletions(-) delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_root (limited to 'app/jitsi/build/jitsi-xmpp') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index b32953a..6357cc6 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -3,7 +3,13 @@ FROM debian:buster ARG VERSION RUN apt-get update && \ - apt-get install -y prosody=${VERSION} + apt-get install -y wget gnupg2 && \ + echo deb http://packages.prosody.im/debian buster main \ + | tee -a /etc/apt/sources.list && \ + wget https://prosody.im/files/prosody-debian-packages.key -O - \ + | apt-key add - && \ + apt-get update && \ + apt-get install -y prosody=${VERSION} lua-event RUN mkdir -p /usr/local/share/ca-certificates/ && \ ln -sf \ @@ -11,10 +17,11 @@ RUN mkdir -p /usr/local/share/ca-certificates/ && \ /usr/local/share/ca-certificates/auth.jitsi.crt && \ mkdir /run/prosody && \ touch /run/prosody/prosody.pid && \ - mkdir -p /var/lib/prosody + mkdir -p /var/lib/prosody && \ + chown -R prosody:prosody /var/lib/prosody /run/prosody -COPY xmpp_root /usr/local/bin/xmpp_root COPY xmpp_prosody /usr/local/bin/xmpp_prosody WORKDIR /var/lib/prosody -CMD ["/usr/local/bin/xmpp_root"] +USER prosody +CMD ["/usr/local/bin/xmpp_prosody"] diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody index 1101302..4ae73f4 100755 --- a/app/jitsi/build/jitsi-xmpp/xmpp_prosody +++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody @@ -1,5 +1,3 @@ #!/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 deleted file mode 100755 index 293915f..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_root +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 -- cgit v1.2.3 From 47bcdaaf0dc6d8caaaa8bd30055420ae90cc73eb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 21:05:10 +0100 Subject: Rework prosody's configuration --- app/jitsi/build/jitsi-xmpp/Dockerfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'app/jitsi/build/jitsi-xmpp') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index 6357cc6..e3a8f8f 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -1,7 +1,16 @@ -FROM debian:buster +FROM debian:buster as builder + +ARG MEET_VERSION +WORKDIR /tmp +RUN apt-get update && \ + apt-get install -y wget unzip && \ + wget https://github.com/jitsi/jitsi-meet/archive/stable/jitsi-meet_${MEET_VERSION}.zip -O meet.zip && \ + unzip meet.zip && \ + mv jitsi-meet-* jitsi-meet -ARG VERSION +FROM debian:buster +ARG PROSODY_VERSION RUN apt-get update && \ apt-get install -y wget gnupg2 && \ echo deb http://packages.prosody.im/debian buster main \ @@ -9,7 +18,7 @@ RUN apt-get update && \ wget https://prosody.im/files/prosody-debian-packages.key -O - \ | apt-key add - && \ apt-get update && \ - apt-get install -y prosody=${VERSION} lua-event + apt-get install -y prosody=${PROSODY_VERSION} lua-event RUN mkdir -p /usr/local/share/ca-certificates/ && \ ln -sf \ @@ -20,6 +29,7 @@ RUN mkdir -p /usr/local/share/ca-certificates/ && \ mkdir -p /var/lib/prosody && \ chown -R prosody:prosody /var/lib/prosody /run/prosody +COPY --from=builder /tmp/jitsi-meet/resources/prosody-plugins /usr/share/jitsi-meet/prosody-plugins/ COPY xmpp_prosody /usr/local/bin/xmpp_prosody WORKDIR /var/lib/prosody -- cgit v1.2.3 From 5b53cf1673d29a7b81d552c69295f3dc7c736635 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 21:47:35 +0100 Subject: Trying to switch on a development version --- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/jitsi/build/jitsi-xmpp') diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody index 4ae73f4..af179e5 100755 --- a/app/jitsi/build/jitsi-xmpp/xmpp_prosody +++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody @@ -1,3 +1,9 @@ #!/bin/bash -cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register +prosodyctl register focus auth.jitsi ${JICOFO_AUTH_PASSWORD} +prosodyctl register jvb auth.jitsi ${JVB_AUTH_PASSWORD} + +# copied from jitsi-meet.postinst +# Make sure the focus@auth user's roster includes the proxy component (this is idempotent) +prosodyctl mod_roster_command subscribe focus.jitsi focus@auth.jitsi + exec prosody -- cgit v1.2.3 From 982efd1b49f7435f7c49c2099aabfc994d3901fb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 23:02:37 +0100 Subject: Still so broken... --- app/jitsi/build/jitsi-xmpp/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/jitsi/build/jitsi-xmpp') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index e3a8f8f..90aae76 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -1,11 +1,12 @@ FROM debian:buster as builder -ARG MEET_VERSION WORKDIR /tmp +ARG MEET_VERSION +ARG PREFIXV RUN apt-get update && \ - apt-get install -y wget unzip && \ - wget https://github.com/jitsi/jitsi-meet/archive/stable/jitsi-meet_${MEET_VERSION}.zip -O meet.zip && \ - unzip meet.zip && \ + apt-get install -y wget unzip +RUN wget https://github.com/jitsi/jitsi-meet/archive/${PREFIXV}${MEET_VERSION}.zip -O meet.zip +RUN unzip meet.zip && \ mv jitsi-meet-* jitsi-meet FROM debian:buster -- cgit v1.2.3