Increase platform abstraction cohesion
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
local env = os.getenv
|
||||
local domain = env("DOMAIN") or "example.com"
|
||||
local xmpp_component = env("XMPP_JID") or ("jews." .. domain)
|
||||
local share_host = env("XMPP_SHARE_HOST") or ("share." .. domain)
|
||||
local xmpp_secret = env("XMPP_SECRET") or ""
|
||||
|
||||
if xmpp_secret == "" then
|
||||
error("XMPP_SECRET is required for Prosody component authentication")
|
||||
end
|
||||
|
||||
sasl_mechanisms = { "PLAIN", "SCRAM-SHA-1", "SCRAM-SHA-256" }
|
||||
sasl_mechanisms = { "PLAIN" }
|
||||
plugin_paths = { "/code/utilities/prosody/modules" }
|
||||
|
||||
daemonize = false
|
||||
pidfile = "/run/prosody/prosody.pid"
|
||||
pidfile = "/tmp/prosody.pid"
|
||||
|
||||
admins = { env("XMPP_ADMIN_JID") or ("admin@" .. domain) }
|
||||
admins = { env("XMPP_ADMIN_JID") or "admin@example.com" }
|
||||
|
||||
modules_enabled = {
|
||||
"disco";
|
||||
@@ -21,30 +19,20 @@ modules_enabled = {
|
||||
"saslauth";
|
||||
"tls";
|
||||
"blocklist";
|
||||
"bookmarks";
|
||||
"carbons";
|
||||
"dialback";
|
||||
"limits";
|
||||
"pep";
|
||||
"private";
|
||||
"smacks";
|
||||
"vcard4";
|
||||
"vcard_legacy";
|
||||
"cloud_notify";
|
||||
"csi_simple";
|
||||
"invites";
|
||||
"invites_adhoc";
|
||||
"invites_register";
|
||||
"ping";
|
||||
"time";
|
||||
"uptime";
|
||||
"version";
|
||||
"mam";
|
||||
"turn_external";
|
||||
"vcard4";
|
||||
"vcard_legacy";
|
||||
"admin_adhoc";
|
||||
"admin_shell";
|
||||
"announce";
|
||||
"auth_external_insecure";
|
||||
"http";
|
||||
}
|
||||
|
||||
@@ -55,7 +43,7 @@ limits = {
|
||||
s2sin = { rate = "100mb/s"; };
|
||||
}
|
||||
|
||||
authentication = "external_insecure"
|
||||
authentication = "gia"
|
||||
archive_expires_after = "1w"
|
||||
|
||||
log = {
|
||||
@@ -65,20 +53,28 @@ log = {
|
||||
}
|
||||
|
||||
certificates = "certs"
|
||||
ssl = {
|
||||
key = "/etc/prosody/certs/cert.pem";
|
||||
certificate = "/etc/prosody/certs/cert.pem";
|
||||
}
|
||||
|
||||
component_ports = { 8888 }
|
||||
component_interfaces = { "0.0.0.0" }
|
||||
|
||||
VirtualHost domain
|
||||
authentication = "external_insecure"
|
||||
external_auth_command = "/code/utilities/prosody/auth_django.sh"
|
||||
certificate = "/etc/prosody/certs/cert.pem"
|
||||
|
||||
Component xmpp_component
|
||||
component_secret = xmpp_secret
|
||||
|
||||
Component share_host "http_file_share"
|
||||
|
||||
http_ports = { 5280 }
|
||||
http_interfaces = { "0.0.0.0", "::" }
|
||||
http_external_url = "https://" .. share_host .. "/"
|
||||
http_external_url = "https://share.example.com/"
|
||||
|
||||
VirtualHost "example.com"
|
||||
authentication = "gia"
|
||||
external_auth_command = "/code/utilities/prosody/auth_django.sh"
|
||||
ssl = {
|
||||
key = "/etc/prosody/certs/cert.pem";
|
||||
certificate = "/etc/prosody/certs/cert.pem";
|
||||
}
|
||||
|
||||
Component "jews.example.com"
|
||||
component_secret = xmpp_secret
|
||||
ssl = {
|
||||
key = "/etc/prosody/certs/cert.pem";
|
||||
certificate = "/etc/prosody/certs/cert.pem";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user