From 88204ea91b98668c6b496445a3ea7b5d368cba7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Mon, 13 May 2019 17:59:04 +0200 Subject: [PATCH] Update the config to the current one running on andromeda --- .../templates/ejabberd.yml.erb | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/site-cookbooks/kosmos-ejabberd/templates/ejabberd.yml.erb b/site-cookbooks/kosmos-ejabberd/templates/ejabberd.yml.erb index 9730415..485487b 100644 --- a/site-cookbooks/kosmos-ejabberd/templates/ejabberd.yml.erb +++ b/site-cookbooks/kosmos-ejabberd/templates/ejabberd.yml.erb @@ -8,11 +8,32 @@ log_rate_limit: 100 hosts: - "kosmos.org" + - "5apps.com" + +host_config: + "kosmos.org": + sql_type: pgsql + sql_server: "localhost" + sql_database: "ejabberd" + sql_username: "ejabberd" + sql_password: "<%= @pgsql_password %>" + "5apps.com": + sql_type: pgsql + sql_server: "localhost" + sql_database: "ejabberd_5apps" + sql_username: "ejabberd" + sql_password: "<%= @pgsql_password %>" -<% if File.exist?("/opt/ejabberd/conf/kosmos.org.pem") -%> certfiles: +<% if File.exist?("/opt/ejabberd/conf/kosmos.org.pem") -%> - "/opt/ejabberd/conf/kosmos.org.pem" <% end -%> +<% if File.exist?("/opt/ejabberd/conf/5apps.com.crt") -%> + - "/opt/ejabberd/conf/5apps.com.crt" +<% end -%> +<% if File.exist?("/opt/ejabberd/conf/5apps.com.key") -%> + - "/opt/ejabberd/conf/5apps.com.key" +<% end -%> ca_file: "/opt/ejabberd/conf/cacert.pem" @@ -55,33 +76,24 @@ listen: max_stanza_size: 131072 shaper: s2s_shaper - - port: 5280 + port: 5443 ip: "::" module: ejabberd_http request_handlers: "/ws": ejabberd_http_ws "/bosh": mod_bosh "/api": mod_http_api - tls: true - ## "/pub/archive": mod_http_fileserver - web_admin: true - ## register: true - captcha: false - - - port: 5443 - module: ejabberd_http - request_handlers: - "upload": mod_http_upload - <% if File.exist?("/opt/ejabberd/conf/kosmos.org.pem") -%> - tls: true - certfiles: - - "/opt/ejabberd/conf/kosmos.org.pem" - <% end -%> + "/upload": mod_http_upload custom_headers: "Access-Control-Allow-Origin": "*" "Access-Control-Allow-Methods": "OPTIONS, HEAD, GET, PUT" "Access-Control-Allow-Headers": "Authorization" "Access-Control-Allow-Credentials": "true" + tls: true + ## "/pub/archive": mod_http_fileserver + web_admin: true + ## register: true + captcha: false s2s_use_starttls: optional @@ -90,13 +102,6 @@ auth_method: sql default_db: sql -sql_type: pgsql -sql_server: "localhost" -sql_database: "ejabberd" -sql_username: "ejabberd" -sql_password: "<%= @pgsql_password %>" -new_sql_schema: true - shaper: normal: 1000 fast: 50000 @@ -198,7 +203,7 @@ modules: - modules: all name: "abuse-addresses" - urls: ["mailto:abuse@kosmos.org"] + urls: ["mailto:abuse@@HOST@"] mod_bosh: {} mod_http_upload: docroot: "/var/www/xmpp.@HOST@/uploads/" @@ -208,15 +213,6 @@ modules: mod_mam: default: always request_activates_archiving: true - mod_muc: - access: - - allow - access_admin: - - allow: admin - access_create: muc_create - access_persistent: muc_create - default_room_options: - mam: true mod_muc_admin: {} mod_offline: access_max_user_messages: max_user_offline_messages @@ -256,16 +252,35 @@ modules: mod_http_api: {} append_host_config: + "5apps.com": + modules: + mod_muc: + host: "muc.@HOST@" + access: + - allow: local + access_admin: + - allow: admin + access_create: muc_create + access_persistent: muc_create + max_user_conferences: 1000 + default_room_options: + anonymous: false + public: true + members_only: true + public_list: false + persistent: true + mam: true "kosmos.org": modules: mod_muc: - host: "chat.kosmos.org" + host: "chat.@HOST@" access: - allow access_admin: - allow: admin access_create: muc_create access_persistent: muc_create + max_user_conferences: 1000 default_room_options: mam: true