--- a/Dockerfile Wed Oct 16 02:09:29 2019 -0500
+++ b/Dockerfile Mon Oct 21 21:57:42 2019 -0500
@@ -4,13 +4,51 @@
apt-get install -y --no-install-recommends \
- lua-dbi-postgresql lua-event \
- prosody prosody-modules \
+ build-essential ca-certificates pkg-config wget \ + libidn11-dev libidn2-dev libssl-dev \ + lua-bitop lua-dbi-postgresql lua-event lua-expat \ + lua-filesystem lua-sec lua-socket \ rm -rf /var/lib/apt/lists
+# create the prosody user and it's home dir + useradd -u 101 -d /var/lib/prosody -U -m -r -s /bin/false prosody +# download and install prosody from an hg archive + wget https://hg.prosody.im/trunk/archive/tip.tar.gz && \ + tar -C prosody --strip-components=1 -zxf tip.tar.gz && \ + ln -s /usr/local/etc/prosody prosody && \ + mkdir /etc/prosody/conf.d +# download and install prosody-modules from an hg archive + wget https://hg.prosody.im/prosody-modules/archive/tip.tar.gz && \ + tar -C /usr/local/lib/prosody/modules --strip-components=1 -zxf tip.tar.gz && \ +# download and install the prosody jetbrains hub auth module + wget https://hg.sr.ht/~grim/prosody_mod_auth_jetbrains_hub/archive/tip.tar.gz && \ + tar -C /usr/local/lib/prosody/modules --strip-components=1 -zxf tip.tar.gz && \ # set some defaults in the config file (logging stolen from prosody/prosody)
perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua && \
@@ -18,7 +56,9 @@
sed -i 's/--"mam"/"mam"/' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"csi_simple"/"csi_simple"/' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"bosh"/"bosh"/' /etc/prosody/prosody.cfg.lua && \
- sed -i 's/VirtualHost "localhost"/--VirtualHost "localhost"/' /etc/prosody/prosody.cfg.lua
+ grep -i virtualhost /etc/prosody/prosody.cfg.lua && \ + sed -i 's/VirtualHost "localhost"/--VirtualHost "localhost"/' /etc/prosody/prosody.cfg.lua && \ + echo 'pidfile="/run/prosody/prosody.pid";' >> /etc/prosody/prosody.cfg.lua mkdir -p /run/prosody/ && \