From 25b343c8c8da5aa695bb0dc7c197fe866e27b65e Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Tue, 5 Jul 2022 21:11:15 +0100 Subject: [PATCH] matrix-ntfy: without nginx, bind to 127.0.0.1:2586 --- group_vars/matrix_servers | 2 ++ .../templates/nginx/conf.d/matrix-ntfy.conf.j2 | 2 +- roles/matrix-ntfy/defaults/main.yml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 1c30405d..25d0a0e1 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1973,6 +1973,8 @@ matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enable matrix_ntfy_enabled: false +matrix_ntfy_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:2586' }}" + ###################################################################### # # /matrix-ntfy diff --git a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-ntfy.conf.j2 b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-ntfy.conf.j2 index e095e721..988b3b35 100644 --- a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-ntfy.conf.j2 +++ b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-ntfy.conf.j2 @@ -25,7 +25,7 @@ proxy_pass http://$backend; {% else %} {# Generic configuration for use outside of our container setup #} - proxy_pass http://127.0.0.1:80; + proxy_pass http://127.0.0.1:2586; {% endif %} proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/roles/matrix-ntfy/defaults/main.yml b/roles/matrix-ntfy/defaults/main.yml index 4f0e2e55..d5fc3fba 100644 --- a/roles/matrix-ntfy/defaults/main.yml +++ b/roles/matrix-ntfy/defaults/main.yml @@ -12,9 +12,9 @@ matrix_ntfy_docker_image_force_pull: "{{ matrix_ntfy_docker_image.endswith(':lat # Public facing base URL of the ntfy service matrix_ntfy_base_url: "https://{{ matrix_server_fqn_ntfy }}" -# Controls whether the container exposes its HTTP port (tcp/8080 in the container). +# Controls whether the container exposes its HTTP port (tcp/80 in the container). # -# Takes an ":" or "" value (e.g. "127.0.0.1:8768"), or empty string to not expose. +# Takes an ":" or "" value (e.g. "127.0.0.1:2586"), or empty string to not expose. matrix_ntfy_container_http_host_bind_port: '' # A list of extra arguments to pass to the container (`docker run` command)