1
0
Fork 0
forked from mirror/prosody

Upgrade to Prosody 0.11.0:

* featuring Lua 5.2
* installing luaevent, luadbi, luadbi-sqlite3 using luarocks (omitting mysql & postgres to keep build small)
* enabling new modules: vcard4, csi_simple, carbons, mam & muc_mam
This commit is contained in:
shaula 2018-11-27 19:33:37 +00:00
parent e83be937b7
commit 7c484beb14
5 changed files with 42 additions and 16 deletions

View file

@ -2,38 +2,50 @@ FROM resin/rpi-raspbian
RUN apt-get update \ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libevent-dev \ libevent-dev `# this is no build dependency, but needed for luaevent` \
lua5.1 \ lua5.2 \
lua-bitop \ lua-bitop \
lua-dbi-sqlite3 \
lua-dbi-mysql \
lua-dbi-postgresql \
lua-event \
lua-expat \ lua-expat \
lua-filesystem \ lua-filesystem \
lua-socket \ lua-socket \
lua-sec \ lua-sec \
sqlite3 \
wget \ wget \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENV PROSODY_VERSION 0.10.2 ENV PROSODY_VERSION 0.11.0
ENV PROSODY_DOWNLOAD_URL https://prosody.im/downloads/source/prosody-${PROSODY_VERSION}.tar.gz ENV PROSODY_DOWNLOAD_URL https://prosody.im/downloads/source/prosody-${PROSODY_VERSION}.tar.gz
ENV PROSODY_DOWNLOAD_SHA1 1d51e542475c3f3e712eace29537b042c941d6ab ENV PROSODY_DOWNLOAD_SHA1 044dcaf89c55a1c3a37eda77872bd70cd86da865
RUN buildDeps='gcc libc6-dev make liblua5.1-dev libidn11-dev libssl-dev' \ RUN buildDeps='gcc git libc6-dev libidn11-dev liblua5.2-dev libsqlite3-dev libssl-dev make unzip' \
&& set -x \ && set -x \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\
&& wget -O prosody.tar.gz "${PROSODY_DOWNLOAD_URL}" \ && wget -O prosody.tar.gz "${PROSODY_DOWNLOAD_URL}" \
&& echo "${PROSODY_DOWNLOAD_SHA1} *prosody.tar.gz" | sha1sum -c - \ && echo "${PROSODY_DOWNLOAD_SHA1} *prosody.tar.gz" | sha1sum -c - \
&& mkdir -p /usr/src/prosody \ && mkdir -p /usr/src/prosody \
&& tar -xzf prosody.tar.gz -C /usr/src/prosody --strip-components=1 \ && tar -xzf prosody.tar.gz -C /usr/src/prosody --strip-components=1 \
&& rm prosody.tar.gz \ && rm prosody.tar.gz \
&& cd /usr/src/prosody && ./configure --ostype=debian \ && cd /usr/src/prosody && ./configure \
&& make -C /usr/src/prosody \ && make -C /usr/src/prosody \
&& make -C /usr/src/prosody install \ && make -C /usr/src/prosody install \
&& rm -r /usr/src/prosody \ && cd / && rm -r /usr/src/prosody \
\
&& mkdir /usr/src/luarocks \
&& cd /usr/src/luarocks \
&& wget https://luarocks.org/releases/luarocks-3.0.4.tar.gz \
&& tar zxpf luarocks-3.0.4.tar.gz \
&& cd luarocks-3.0.4 \
&& ./configure \
&& sudo make bootstrap \
&& cd / && rm -r /usr/src/luarocks \
\
&& luarocks install luaevent \
&& luarocks install luadbi \
&& luarocks install luadbi-sqlite3 \
\
&& apt-get purge -y --auto-remove $buildDeps && apt-get purge -y --auto-remove $buildDeps
EXPOSE 5000 5222 5269 5347 5280 5281 EXPOSE 5000 5222 5269 5347 5280 5281
@ -66,3 +78,4 @@ USER prosody
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
CMD ["prosody"] CMD ["prosody"]

View file

@ -9,12 +9,13 @@ modules_enabled = {
"disco"; -- Service discovery "disco"; -- Service discovery
-- Not essential, but recommended -- Not essential, but recommended
"blocklist"; -- simple modern protocol for blocking remote JIDs (XEP-0191) "blocklist"; -- Simple modern protocol for blocking remote JIDs (XEP-0191)
"private"; -- Private XML storage (for room bookmarks, etc.) "private"; -- Private XML storage (for room bookmarks, etc.)
"vcard"; -- Allow users to set vCards "vcard4"; -- Allow users to set vCards
"vcard_legacy"; -- Support older clients
-- These are commented by default as they have a performance impact "mam"; -- Message Archive (XEP-0313)
--"compression"; -- Stream compression (Debian: requires lua-zlib module to work) "carbons"; -- Share and sync conversations (XEP-0280)
"csi_simple"; -- Buffer unimportant traffic for simple optimisation for clients using state indication
-- Nice to have -- Nice to have
"version"; -- Replies to server version requests "version"; -- Replies to server version requests

View file

@ -14,3 +14,4 @@ storage = {
-- https://modules.prosody.im/mod_mam.html -- https://modules.prosody.im/mod_mam.html
archive_expires_after = "1y" archive_expires_after = "1y"

View file

@ -21,4 +21,7 @@ Component ("muc." .. domain) "muc"
name = "Prosody Chatrooms" name = "Prosody Chatrooms"
restrict_room_creation = false restrict_room_creation = false
max_history_messages = 20 max_history_messages = 20
modules_enabled = {
"muc_mam";
}

View file

@ -105,4 +105,12 @@ log = {
{levels = {min = "debug"}, to = "console"}; {levels = {min = "debug"}, to = "console"};
}; };
``` ```
### Upgrade
When migrating from 0.10, you need to update the database once:
```bash
docker-compose exec server bash
prosodyctl mod_storage_sql upgrade
```