From 265fc1606359830a5329fb52926f9db7b1525e3e Mon Sep 17 00:00:00 2001 From: hexlocation Date: Thu, 26 Dec 2024 22:56:02 +0100 Subject: [PATCH] fix: add variables to global vhost --- conf.d/05-vhost.cfg.lua | 8 +++++--- readme.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/conf.d/05-vhost.cfg.lua b/conf.d/05-vhost.cfg.lua index a269481..7ddc77e 100644 --- a/conf.d/05-vhost.cfg.lua +++ b/conf.d/05-vhost.cfg.lua @@ -20,6 +20,11 @@ https_ssl = { } VirtualHost (domain) + +turn_external_host = os.getenv("TURN_EXTERNAL_HOST") or "turn" .. domain; +turn_external_port = os.getenv("TURN_EXTERNAL_PORT") or 3478; +turn_external_secret = os.getenv("TURN_EXTERNAL_SECRET"); + disco_items = { { domain_http_upload }, } @@ -50,6 +55,3 @@ Component (domain_pubsub) "pubsub" -- Set TURN server information. -turn_external_host = os.getenv("TURN_EXTERNAL_HOST") or "turn" .. domain; -turn_external_port = os.getenv("TURN_EXTERNAL_PORT") or 3478; -turn_external_secret = os.getenv("TURN_EXTERNAL_SECRET"); diff --git a/readme.md b/readme.md index a2c9086..8113d2c 100644 --- a/readme.md +++ b/readme.md @@ -236,7 +236,7 @@ sudo chown 999:999 ./data | **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**" | | **TURN_EXTERNAL_HOST** | The external hostname for the TURN server. | *optional* | "turn.**DOMAIN**" | -| **TURN_EXTERNAL_PORT** | The external port for the TURN server. | *optional* | "" | +| **TURN_EXTERNAL_PORT** | The external port for the TURN server. | *optional* | "3478" | | **TURN_EXTERNAL_SECRET** | The external secret for the TURN server. | *optional* | "" | | **PROSODY_ADMINS** | Specify who is an administrator. List of adresses. Eg. "me@example.com", "admin@example.net" | *optional* | "" |