Fix arrays with multiple values (#14)

* fix arrays
* Set pidfile in prosody.cfg.lua
This commit is contained in:
Sara Aimée Smiseth 2020-10-10 08:55:43 +02:00 committed by GitHub
parent ade86ee812
commit 357f4d4040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 10 deletions

View file

@ -2,7 +2,8 @@
## Unreleased ## Unreleased
* Nothing * Fixed using list ENV variables with multiple values
* Set pidfile in prosody.cfg.lua
## v1.1.2 ## v1.1.2

View file

@ -49,6 +49,7 @@ RUN buildDeps='gcc git libc6-dev libidn11-dev liblua5.2-dev libsqlite3-dev libss
&& luarocks install luaevent \ && luarocks install luaevent \
&& luarocks install luadbi \ && luarocks install luadbi \
&& luarocks install luadbi-sqlite3 \ && luarocks install luadbi-sqlite3 \
&& luarocks install stringy \
\ \
&& apt-get purge -y --auto-remove $buildDeps && apt-get purge -y --auto-remove $buildDeps
@ -58,6 +59,9 @@ RUN groupadd -r prosody \
&& useradd -r -g prosody prosody \ && useradd -r -g prosody prosody \
&& chown prosody:prosody /usr/local/var/lib/prosody && chown prosody:prosody /usr/local/var/lib/prosody
RUN mkdir -p /var/run/prosody/ \
&& chown prosody:prosody /var/run/prosody/
# https://github.com/prosody/prosody-docker/issues/25 # https://github.com/prosody/prosody-docker/issues/25
ENV __FLUSH_LOG yes ENV __FLUSH_LOG yes

View file

@ -1,6 +1,8 @@
local stringy = require "stringy"
e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") e2e_policy_chat = os.getenv("E2E_POLICY_CHAT")
e2e_policy_muc = os.getenv("E2E_POLICY_MUC") e2e_policy_muc = os.getenv("E2E_POLICY_MUC")
e2e_policy_whitelist = { os.getenv("E2E_POLICY_WHITELIST") } e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST"), ", ")
e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server." e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server."
e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server." e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server."
e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server." e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server."

View file

@ -1,8 +1,10 @@
local stringy = require "stringy"
contact_info = { contact_info = {
abuse = { os.getenv("SERVER_CONTACT_INFO_ABUSE") }; abuse = stringy.split(os.getenv("SERVER_CONTACT_INFO_ABUSE"), ", ");
admin = { os.getenv("SERVER_CONTACT_INFO_ADMIN") }; admin = stringy.split(os.getenv("SERVER_CONTACT_INFO_ADMIN"), ", ");
feedback = { os.getenv("SERVER_CONTACT_INFO_FEEDBACK") }; feedback = stringy.split(os.getenv("SERVER_CONTACT_INFO_FEEDBACK"), ", ");
sales = { os.getenv("SERVER_CONTACT_INFO_SALES") }; sales = stringy.split(os.getenv("SERVER_CONTACT_INFO_SALES"), ", ");
security = { os.getenv("SERVER_CONTACT_INFO_SECURITY") }; security = stringy.split(os.getenv("SERVER_CONTACT_INFO_SECURITY"), ", ");
support = { os.getenv("SERVER_CONTACT_INFO_SUPPORT") }; support = stringy.split(os.getenv("SERVER_CONTACT_INFO_SUPPORT"), ", ");
} }

View file

@ -35,5 +35,4 @@ if [ -z "$DOMAIN" ]; then
exit 1 exit 1
fi fi
exec "$@" exec "$@"

View file

@ -1,7 +1,11 @@
-- see example config at https://hg.prosody.im/0.9/file/0.9.10/prosody.cfg.lua.dist -- see example config at https://hg.prosody.im/0.9/file/0.9.10/prosody.cfg.lua.dist
-- easily extendable by putting into different config files within conf.d folder -- easily extendable by putting into different config files within conf.d folder
admins = { os.getenv("PROSODY_ADMINS") }; local stringy = require "stringy"
admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", ");
pidfile = "/var/run/prosody/prosody.pid"
use_libevent = true; -- improves performance use_libevent = true; -- improves performance