diff --git a/CHANGELOG.md b/CHANGELOG.md index ef0ba7f..e216a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Add badges to README. Fixes #5. * Update readme. Fixes #2 +* Add PROSODY_ADMINS to specify who is an administrator. Fixes #7 ## v1.0.0 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4e8d0af..4d614f7 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -24,5 +24,6 @@ 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 PROSODY_ADMINS=${PROSODY_ADMINS:-""} exec "$@" diff --git a/prosody.cfg.lua b/prosody.cfg.lua index 2f29ec3..9b887b8 100644 --- a/prosody.cfg.lua +++ b/prosody.cfg.lua @@ -1,7 +1,7 @@ -- 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 -admins = {}; +admins = { os.getenv("PROSODY_ADMINS") }; use_libevent = true; -- improves performance diff --git a/readme.md b/readme.md index 990f66f..c11de14 100644 --- a/readme.md +++ b/readme.md @@ -197,6 +197,7 @@ Inspect logs: ```docker-compose logs -f```. | **C2S_REQUIRE_ENCRYPTION** | Whether to force all client-to-server connections to be encrypted or not | *optional* | true | | **S2S_REQUIRE_ENCRYPTION** | Whether to force all server-to-server connections to be encrypted or not | *optional* | true | | **S2S_SECURE_AUTH** | Require encryption and certificate authentication | *optional* | true | +| **PROSODY_ADMINS** | Specify who is an administrator. List of adresses. Eg. "me@example.com", "admin@example.net" | *optional* | "" | #### DNS