Polished prosody

This commit is contained in:
Quentin 2021-01-28 19:28:15 +01:00
parent 4809e27220
commit 0e848bb2d0
8 changed files with 29 additions and 23 deletions

View file

@ -73,7 +73,7 @@ services:
build: build:
context: ./jitsi/build/jitsi-xmpp context: ./jitsi/build/jitsi-xmpp
args: args:
VERSION: 0.11.2-1 VERSION: 0.11.7-1~buster4
image: superboum/amd64_jitsi_xmpp:v9 image: superboum/amd64_jitsi_xmpp:v9
plume: plume:

View file

@ -3,7 +3,13 @@ FROM debian:buster
ARG VERSION ARG VERSION
RUN apt-get update && \ 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/ && \ RUN mkdir -p /usr/local/share/ca-certificates/ && \
ln -sf \ ln -sf \
@ -11,10 +17,11 @@ RUN mkdir -p /usr/local/share/ca-certificates/ && \
/usr/local/share/ca-certificates/auth.jitsi.crt && \ /usr/local/share/ca-certificates/auth.jitsi.crt && \
mkdir /run/prosody && \ mkdir /run/prosody && \
touch /run/prosody/prosody.pid && \ 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 COPY xmpp_prosody /usr/local/bin/xmpp_prosody
WORKDIR /var/lib/prosody WORKDIR /var/lib/prosody
CMD ["/usr/local/bin/xmpp_root"] USER prosody
CMD ["/usr/local/bin/xmpp_prosody"]

View file

@ -1,5 +1,3 @@
#!/bin/bash #!/bin/bash
chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody
cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register
exec prosody exec prosody

View file

@ -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

View file

@ -52,6 +52,10 @@ prosodyctl cert generate auth.jitsi
prosodyctl cert generate jitsi prosodyctl cert generate jitsi
``` ```
## An example prosody configuration file
https://github.com/jitsi/jitsi-meet/blob/master/doc/example-config-files/prosody.cfg.lua.example
## Resources to understand jitsi ## Resources to understand jitsi
- [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst) - [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst)

View file

@ -3,12 +3,12 @@ services:
jitsi-xmpp: jitsi-xmpp:
image: superboum/amd64_jitsi_xmpp:v9 image: superboum/amd64_jitsi_xmpp:v9
volumes: volumes:
- "./prosody/prosody.cfg.lua:/etc/prosody/prosody.cfg.lua" - "./prosody/prosody.cfg.lua:/etc/prosody/prosody.cfg.lua:ro"
- "./prosody/accounts.txt:/etc/prosody/accounts.txt" - "./prosody/accounts.txt:/etc/prosody/accounts.txt:ro"
- "./prosody/certs/jitsi.crt:/var/lib/prosody/jitsi.crt" - "./prosody/certs/jitsi.crt:/var/lib/prosody/jitsi.crt:ro"
- "./prosody/certs/jitsi.key:/var/lib/prosody/jitsi.key" - "./prosody/certs/jitsi.key:/var/lib/prosody/jitsi.key:ro"
- "./prosody/certs/auth.jitsi.crt:/var/lib/prosody/auth.jitsi.crt" - "./prosody/certs/auth.jitsi.crt:/var/lib/prosody/auth.jitsi.crt:ro"
- "./prosody/certs/auth.jitsi.key:/var/lib/prosody/auth.jitsi.key" - "./prosody/certs/auth.jitsi.key:/var/lib/prosody/auth.jitsi.key:ro"
jitsi-meet: jitsi-meet:
image: superboum/amd64_jitsi_meet:v1 image: superboum/amd64_jitsi_meet:v1
ports: ports:

View file

@ -241,9 +241,9 @@ jicofo {
enabled = true enabled = true
hostname = "jitsi-xmpp" hostname = "jitsi-xmpp"
port = 5222 port = 5222
#domain = domain = "auth.jitsi"
username = "focus" username = "focus"
password = "3x@mple01" password = "xxx"
// How long to wait for a response to a stanza before giving up. // How long to wait for a response to a stanza before giving up.
reply-timeout = 15 seconds reply-timeout = 15 seconds

View file

@ -4,6 +4,7 @@ use_libevent = true
component_interface = "0.0.0.0" component_interface = "0.0.0.0"
component_ports = { 5347 } component_ports = { 5347 }
http_ports = { 5280 } http_ports = { 5280 }
https_ports = {}
-- Not sure all modules are required -- Not sure all modules are required
modules_enabled = { modules_enabled = {
@ -13,14 +14,13 @@ modules_enabled = {
"dialback"; -- s2s dialback support "dialback"; -- s2s dialback support
"disco"; -- Service discovery "disco"; -- Service discovery
"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
"compression"; -- Stream compression (requires the lua-zlib package installed)
"version"; -- Replies to server version requests "version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running "uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server "time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs "ping"; -- Replies to XMPP pings with pongs
"pep"; -- Enables users to publish their mood, activity, playing music and more "pep"; -- Enables users to publish their mood, activity, playing music and more
-- jitsi -- jitsi
"smacks"; --"smacks"; -- not shipped with prosody
"carbons"; "carbons";
"mam"; "mam";
"lastactivity"; "lastactivity";
@ -28,11 +28,12 @@ modules_enabled = {
"pubsub"; "pubsub";
"adhoc"; "adhoc";
"websocket"; "websocket";
"http_altconnect"; --"http_altconnect"; -- not shipped with prosody
} }
log = { log = {
"*console"; --log less on console with warn="*console"; or err="*console" or more with debug="*console"
info="*console";
} }
VirtualHost "jitsi" VirtualHost "jitsi"