mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-01-18 13:10:37 +00:00
Make 04-server_contact_info.cfg.lua configurable with ENV variables. Fixes #4
This commit is contained in:
parent
a5c6d5ecef
commit
fd21384bdf
4 changed files with 32 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
* Nothing yet
|
* Made 04-server_contact_info.cfg.lua configurable with ENV variables. See [#4](https://github.com/SaraSmiseth/prosody/issues/4).
|
||||||
|
|
||||||
## v1.1.1
|
## v1.1.1
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
local domain = os.getenv("DOMAIN")
|
local domain = os.getenv("DOMAIN")
|
||||||
|
|
||||||
contact_info = {
|
contact_info = {
|
||||||
abuse = { "xmpp:abuse@" .. domain };
|
abuse = { os.getenv("SERVER_CONTACT_INFO_ABUSE") };
|
||||||
admin = { "xmpp:admin@" .. domain };
|
admin = { os.getenv("SERVER_CONTACT_INFO_ADMIN") };
|
||||||
feedback = { "xmpp:feedback@" .. domain };
|
feedback = { os.getenv("SERVER_CONTACT_INFO_FEEDBACK") };
|
||||||
sales = { "xmpp:sales@" .. domain };
|
sales = { os.getenv("SERVER_CONTACT_INFO_SALES") };
|
||||||
security = { "xmpp:security@" .. domain };
|
security = { os.getenv("SERVER_CONTACT_INFO_SECURITY") };
|
||||||
support = { "xmpp:support@" .. domain };
|
support = { os.getenv("SERVER_CONTACT_INFO_SUPPORT") };
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,12 @@ export LOG_LEVEL=${LOG_LEVEL:-"info"}
|
||||||
export C2S_REQUIRE_ENCRYPTION=${C2S_REQUIRE_ENCRYPTION:-true}
|
export C2S_REQUIRE_ENCRYPTION=${C2S_REQUIRE_ENCRYPTION:-true}
|
||||||
export S2S_REQUIRE_ENCRYPTION=${S2S_REQUIRE_ENCRYPTION:-true}
|
export S2S_REQUIRE_ENCRYPTION=${S2S_REQUIRE_ENCRYPTION:-true}
|
||||||
export S2S_SECURE_AUTH=${S2S_SECURE_AUTH:-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"}
|
||||||
|
export SERVER_CONTACT_INFO_SALES=${SERVER_CONTACT_INFO_SALES:-"xmpp:sales@$DOMAIN"}
|
||||||
|
export SERVER_CONTACT_INFO_SECURITY=${SERVER_CONTACT_INFO_SECURITY:-"xmpp:security@$DOMAIN"}
|
||||||
|
export SERVER_CONTACT_INFO_SUPPORT=${SERVER_CONTACT_INFO_SUPPORT:-"xmpp:support@$DOMAIN"}
|
||||||
export PROSODY_ADMINS=${PROSODY_ADMINS:-""}
|
export PROSODY_ADMINS=${PROSODY_ADMINS:-""}
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
32
readme.md
32
readme.md
|
@ -183,19 +183,25 @@ Inspect logs: ```docker-compose logs -f```.
|
||||||
|
|
||||||
#### Environment variables
|
#### Environment variables
|
||||||
|
|
||||||
| Variable | Description | Type | Default value |
|
| Variable | Description | Type | Default value |
|
||||||
| -------------------------- | ------------------------------------------------------------------------------------------------------- | ------------ | --------------------- |
|
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------- |
|
||||||
| **ALLOW_REGISTRATION** | Whether to allow registration of new accounts via Jabber clients | *optional* | true |
|
| **ALLOW_REGISTRATION** | Whether to allow registration of new accounts via Jabber clients | *optional* | true |
|
||||||
| **DOMAIN** | domain | **required** | null |
|
| **DOMAIN** | domain | **required** | null |
|
||||||
| **DOMAIN_HTTP_UPLOAD** | Domain which lets clients upload files over HTTP | *optional* | upload.**DOMAIN** |
|
| **DOMAIN_HTTP_UPLOAD** | Domain which lets clients upload files over HTTP | *optional* | upload.**DOMAIN** |
|
||||||
| **DOMAIN_MUC** | Domain for Multi-user chat (MUC) for allowing you to create hosted chatrooms/conferences for XMPP users | *optional* | conference.**DOMAIN** |
|
| **DOMAIN_MUC** | Domain for Multi-user chat (MUC) for allowing you to create hosted chatrooms/conferences for XMPP users | *optional* | conference.**DOMAIN** |
|
||||||
| **DOMAIN_PROXY** | Domain for SOCKS5 bytestream proxy for server-proxied file transfers | *optional* | proxy.**DOMAIN** |
|
| **DOMAIN_PROXY** | Domain for SOCKS5 bytestream proxy for server-proxied file transfers | *optional* | proxy.**DOMAIN** |
|
||||||
| **DOMAIN_PUBSUB** | Domain for a XEP-0060 pubsub service | *optional* | pubsub.**DOMAIN** |
|
| **DOMAIN_PUBSUB** | Domain for a XEP-0060 pubsub service | *optional* | pubsub.**DOMAIN** |
|
||||||
| **LOG_LEVEL** | Min log level. Change to debug for more information | *optional* | info |
|
| **LOG_LEVEL** | Min log level. Change to debug for more information | *optional* | info |
|
||||||
| **C2S_REQUIRE_ENCRYPTION** | Whether to force all client-to-server connections to be encrypted or not | *optional* | true |
|
| **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_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 |
|
| **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* | "" |
|
| **SERVER_CONTACT_INFO_ABUSE** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:abuse@**DOMAIN**" |
|
||||||
|
| **SERVER_CONTACT_INFO_ADMIN** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:admin@**DOMAIN**" |
|
||||||
|
| **SERVER_CONTACT_INFO_FEEDBACK** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:feedback@**DOMAIN**" |
|
||||||
|
| **SERVER_CONTACT_INFO_SALES** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:sales@**DOMAIN**" |
|
||||||
|
| **SERVER_CONTACT_INFO_SECURITY** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:security@**DOMAIN**" |
|
||||||
|
| **SERVER_CONTACT_INFO_SUPPORT** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:support@**DOMAIN**" |
|
||||||
|
| **PROSODY_ADMINS** | Specify who is an administrator. List of adresses. Eg. "me@example.com", "admin@example.net" | *optional* | "" |
|
||||||
|
|
||||||
#### DNS
|
#### DNS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue