Browse Source

fixed macro syntax error

dominik 2 years ago
parent
commit
0049b2c7de
4 changed files with 12 additions and 5 deletions
  1. 2 0
      README.md
  2. 1 2
      data/conf.d/44-irc.yml
  3. 6 3
      data/conf.d/60-modules.yml
  4. 3 0
      entrypoint.sh

+ 2 - 0
README.md

@@ -168,3 +168,5 @@ Docker's randomly generated hostnames causes ejabberd to [calculate](https://doc
 #### Debugging
 
 Inspect the vanilla container: `docker run --rm -it --entrypoint /bin/sh ejabberd/ecs`
+
+Dump current configuration as seen by ejabberd: `docker exec ejabberd /bin/sh -c "bin/ejabberdctl dump_config ~/backup/config-dump.yml"`

+ 1 - 2
data/conf.d/44-irc.yml

@@ -4,8 +4,7 @@ listen:
    ip: "::"
    module: ejabberd_service
    access: all
-   password: "secret"
    hosts:
-     IRCDOMAIN
+     IRCDOMAIN #macro defined in ~/env.yml
      #"irc.im.example.com":
      #  password: "SecretPasswortBetweenEjabberdAndBiboumi"

+ 6 - 3
data/conf.d/60-modules.yml

@@ -18,7 +18,8 @@ modules:
   mod_client_state: {}
   mod_configure: {} # requires mod_adhoc
   mod_conversejs:
-    websocket_url: "ws://@HOST@:5280/websocket"
+#    websocket_url: "ws://@HOST@:5280/websocket"
+    websocket_url: WS_URL #macro defined in ~/env.yml
 
   ## mod_delegation: {} # for xep0356
   mod_disco:
@@ -37,11 +38,13 @@ modules:
   ##  accesslog: "/home/ejabberd/logs/access.log"
   #mod_http_api: {}
   mod_http_upload:
-    put_url: "https://@HOST@:5443/upload"
+#    put_url: "https://@HOST@:5443/upload"
+    put_url: PUT_URL #macro defined in ~/env.yml
     thumbnail: false # otherwise needs ejabberd to be compiled with libgd support
     max_size: 524288 # 5MB
     custom_headers:
-      "Access-Control-Allow-Origin": "https://@HOST@"
+#      "Access-Control-Allow-Origin": "https://@HOST@"
+      "Access-Control-Allow-Origin": ACL_ORIGIN  #macro defined in ~/env.yml
       "Access-Control-Allow-Methods": "GET,HEAD,PUT,OPTIONS"
       "Access-Control-Allow-Headers": "Content-Type"
   mod_http_upload_quota:

+ 3 - 0
entrypoint.sh

@@ -6,6 +6,9 @@ define_macro:
   IRCDOMAIN:
     irc.$HOSTNAME:
        password: $IRCPASS
+  WS_URL: "ws://$HOSTNAME:5280/websocket"
+  ACL_ORIGIN: "https://$HOSTNAME"
+  PUT_URL: "https://$HOSTNAME:5443/upload"
 EOF
 cat ~/env.yml