diff options
author | terminaldweller <devi@terminaldweller.com> | 2023-07-13 18:10:26 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2023-07-13 18:10:26 +0000 |
commit | b595ac2150e42a22e92b954188ae374d290b3f53 (patch) | |
tree | b5e9d5e421c6d266e669476e2a1dfa4e89383953 /terminaldweller.com/ejabberd | |
parent | update (diff) | |
download | scripts-b595ac2150e42a22e92b954188ae374d290b3f53.tar.gz scripts-b595ac2150e42a22e92b954188ae374d290b3f53.zip |
Diffstat (limited to 'terminaldweller.com/ejabberd')
-rwxr-xr-x | terminaldweller.com/ejabberd/add_users.sh | 6 | ||||
-rw-r--r-- | terminaldweller.com/ejabberd/docker-compose.yaml | 3 | ||||
-rw-r--r-- | terminaldweller.com/ejabberd/ejabberd.yml | 37 |
3 files changed, 40 insertions, 6 deletions
diff --git a/terminaldweller.com/ejabberd/add_users.sh b/terminaldweller.com/ejabberd/add_users.sh new file mode 100755 index 0000000..5243730 --- /dev/null +++ b/terminaldweller.com/ejabberd/add_users.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +EJABBERD=$(docker ps | grep ejabberd | awk '{print $1}') +docker exec -it ${EJABBERD} bin/ejabberdctl register someuser1 jabber.terminaldweller.com passywo00rd # pragma: allowlist secret +docker exec -it ${EJABBERD} bin/ejabberdctl register someuser2 jabber.terminaldweller.com passywo00rd # pragma: allowlist secret +docker exec -it ${EJABBERD} bin/ejabberdctl register someuser3 jabber.terminaldweller.com passywo00rd # pragma: allowlist secret diff --git a/terminaldweller.com/ejabberd/docker-compose.yaml b/terminaldweller.com/ejabberd/docker-compose.yaml index 3c860ae..e3c1095 100644 --- a/terminaldweller.com/ejabberd/docker-compose.yaml +++ b/terminaldweller.com/ejabberd/docker-compose.yaml @@ -1,7 +1,7 @@ version: "3.4" services: ejabberd: - image: ejabberd/ecs:23.01 + image: ejabberd/ecs:23.04 networks: - ejabberdnet ports: @@ -13,6 +13,7 @@ services: - "5443:5443" #- "1883:1883" #- "127.0.0.1:5080:5080" + - "443:443" restart: unless-stopped volumes: - ./ejabberd.yml:/home/ejabberd/conf/ejabberd.yml diff --git a/terminaldweller.com/ejabberd/ejabberd.yml b/terminaldweller.com/ejabberd/ejabberd.yml index 5072841..58a5595 100644 --- a/terminaldweller.com/ejabberd/ejabberd.yml +++ b/terminaldweller.com/ejabberd/ejabberd.yml @@ -82,15 +82,26 @@ listen: ciphers: 'TLS_CIPHERS' dhfile: 'DH_FILE' request_handlers: - '/admin': ejabberd_web_admin + #'/admin': ejabberd_web_admin '/api': mod_http_api '/bosh': mod_bosh '/captcha': ejabberd_captcha '/upload': mod_http_upload '/ws': ejabberd_http_ws '/oauth': ejabberd_oauth + #'/.well-known/host-meta': mod_host_meta + #'/.well-known/host-meta.json': mod_host_meta + - port: 443 + ip: '0.0.0.0' + module: ejabberd_http + tls: true + protocol_options: 'TLS_OPTIONS' + ciphers: 'TLS_CIPHERS' + dhfile: 'DH_FILE' + request_handlers: '/.well-known/host-meta': mod_host_meta '/.well-known/host-meta.json': mod_host_meta + '/admin': ejabberd_web_admin - port: 5080 ip: '0.0.0.0' module: ejabberd_http @@ -257,16 +268,32 @@ modules: mod_carboncopy: {} mod_client_state: {} mod_configure: {} - mod_disco: {} + mod_disco: + server_info: + - + modules: all + name: "abuse-addresses" + urls: ["mailto:devi@terminaldweller.com"] + - + modules: [mod_host_meta] + name: "mod host meta location" + urls: + - https://jabber.terminaldweller.com:5443 mod_fail2ban: {} mod_http_api: {} mod_http_upload: put_url: https://@HOST@:5443/upload + docroot: /var/www/upload + custom_headers: + "Access-Control-Allow-Origin": "https://@HOST@" + "Access-Control-Allow-Methods": "GET,HEAD,PUT,OPTIONS" + "Access-Control-Allow-Headers": "Content-Type" mod_last: {} mod_mam: - db_type: sql + db_type: mnesia assume_mam_usage: true - default: never + default: always + use_cache: true mod_mqtt: {} mod_muc: access: @@ -279,7 +306,7 @@ modules: - allow default_room_options: allow_subscription: true - mam: false + mam: true mod_muc_admin: {} mod_offline: access_max_user_messages: max_user_offline_messages |