mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-04-19 16:01:14 +00:00
Move multiple defaults from entrypoint script to cfg.lua files.
This commit is contained in:
parent
0e33f70739
commit
5d73416ac4
4 changed files with 9 additions and 18 deletions
|
@ -1,8 +1,8 @@
|
|||
default_storage = "sql"
|
||||
|
||||
sql = {
|
||||
driver = os.getenv("DB_DRIVER");
|
||||
database = os.getenv("DB_DATABASE");
|
||||
driver = os.getenv("DB_DRIVER") or "SQLite3";
|
||||
database = os.getenv("DB_DATABASE") or "prosody.sqlite";
|
||||
host = os.getenv("DB_HOST");
|
||||
port = os.getenv("DB_PORT");
|
||||
username = os.getenv("DB_USERNAME");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local stringy = require "stringy"
|
||||
|
||||
e2e_policy_chat = os.getenv("E2E_POLICY_CHAT")
|
||||
e2e_policy_muc = os.getenv("E2E_POLICY_MUC")
|
||||
e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") or "required"
|
||||
e2e_policy_muc = os.getenv("E2E_POLICY_MUC") or "required"
|
||||
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_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server."
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
|
||||
export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"}
|
||||
export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"}
|
||||
export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"}
|
||||
export DOMAIN_PUBSUB=${DOMAIN_PUBSUB:-"pubsub.$DOMAIN"}
|
||||
export DB_DRIVER=${DB_DRIVER:-"SQLite3"}
|
||||
export DB_DATABASE=${DB_DATABASE:-"prosody.sqlite"}
|
||||
export E2E_POLICY_CHAT=${E2E_POLICY_CHAT:-"required"}
|
||||
export E2E_POLICY_MUC=${E2E_POLICY_MUC:-"required"}
|
||||
export E2E_POLICY_WHITELIST=${E2E_POLICY_WHITELIST:-""}
|
||||
export LOG_LEVEL=${LOG_LEVEL:-"info"}
|
||||
export C2S_REQUIRE_ENCRYPTION=${C2S_REQUIRE_ENCRYPTION:-true}
|
||||
export S2S_REQUIRE_ENCRYPTION=${S2S_REQUIRE_ENCRYPTION:-true}
|
||||
export S2S_SECURE_AUTH=${S2S_SECURE_AUTH:-true}
|
||||
export SERVER_CONTACT_INFO_ABUSE=${SERVER_CONTACT_INFO_ABUSE:-"xmpp:abuse@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_ADMIN=${SERVER_CONTACT_INFO_ADMIN:-"xmpp:admin@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_FEEDBACK=${SERVER_CONTACT_INFO_FEEDBACK:-"xmpp:feedback@$DOMAIN"}
|
||||
|
|
|
@ -7,11 +7,11 @@ admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", ");
|
|||
|
||||
pidfile = "/var/run/prosody/prosody.pid"
|
||||
|
||||
allow_registration = os.getenv("ALLOW_REGISTRATION");
|
||||
allow_registration = os.getenv("ALLOW_REGISTRATION") or "true";
|
||||
|
||||
c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION");
|
||||
s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION");
|
||||
s2s_secure_auth = os.getenv("S2S_SECURE_AUTH");
|
||||
c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION") or "true";
|
||||
s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION") or "true";
|
||||
s2s_secure_auth = os.getenv("S2S_SECURE_AUTH") or "true";
|
||||
|
||||
authentication = os.getenv("AUTHENTICATION") or "internal_hashed";
|
||||
|
||||
|
@ -26,7 +26,7 @@ ldap_mode = os.getenv("LDAP_MODE") or "bind";
|
|||
ldap_admin_filter = os.getenv("LDAP_ADMIN_FILTER") or "";
|
||||
|
||||
log = {
|
||||
{levels = {min = os.getenv("LOG_LEVEL")}, to = "console"};
|
||||
{levels = {min = os.getenv("LOG_LEVEL") or "info"}, to = "console"};
|
||||
};
|
||||
|
||||
Include "conf.d/*.cfg.lua";
|
||||
|
|
Loading…
Reference in a new issue