Quellcode durchsuchen

fixes

pull/2135/head
Karmanyaah Malhotra vor 3 Jahren
Ursprung
Commit
2a87ac90fd
3 geänderte Dateien mit 4 neuen und 5 gelöschten Zeilen
  1. +0
    -1
      roles/custom/matrix-ntfy/defaults/main.yml
  2. +1
    -2
      roles/custom/matrix-ntfy/templates/ntfy/server.yml.j2
  3. +3
    -2
      roles/custom/matrix-ntfy/templates/systemd/matrix-ntfy.service.j2

+ 0
- 1
roles/custom/matrix-ntfy/defaults/main.yml Datei anzeigen

@@ -20,7 +20,6 @@ matrix_ntfy_global_topic_limit: 15000 # default
matrix_ntfy_visitor_subscription_limit: 30 # default matrix_ntfy_visitor_subscription_limit: 30 # default
matrix_ntfy_visitor_request_limit_burst: 60 # default matrix_ntfy_visitor_request_limit_burst: 60 # default
matrix_ntfy_visitor_request_limit_replenish: "5s" # default matrix_ntfy_visitor_request_limit_replenish: "5s" # default
matrix_ntfy_visitor_request_limit_exempt_hosts: "{{matrix_server_fqn_matrix}},localhost" # exempt our matrix server from rate limits, this may not work when the homeserver's outgoing IP is different from the incoming IP, but most small deployments should be fine.




# Controls whether the container exposes its HTTP port (tcp/80 in the container). # Controls whether the container exposes its HTTP port (tcp/80 in the container).


+ 1
- 2
roles/custom/matrix-ntfy/templates/ntfy/server.yml.j2 Datei anzeigen

@@ -8,5 +8,4 @@ global-topic-limit: {{ matrix_ntfy_global_topic_limit | to_json }}
visitor-subscription-limit: {{ matrix_ntfy_visitor_subscription_limit | to_json }} visitor-subscription-limit: {{ matrix_ntfy_visitor_subscription_limit | to_json }}


visitor-request-limit-burst: {{ matrix_ntfy_visitor_request_limit_burst | to_json }} visitor-request-limit-burst: {{ matrix_ntfy_visitor_request_limit_burst | to_json }}
visitor-request-limit-replenish: "{{ matrix_ntfy_visitor_request_limit_replenish | to_json }}"
visitor-request-limit-exempt-hosts: "{{ matrix_ntfy_visitor_request_limit_exempt_hosts | to_json }}"
visitor-request-limit-replenish: "{{ matrix_ntfy_visitor_request_limit_replenish }}"

+ 3
- 2
roles/custom/matrix-ntfy/templates/systemd/matrix-ntfy.service.j2 Datei anzeigen

@@ -11,11 +11,12 @@ Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-ntfy 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-ntfy 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ntfy 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ntfy 2>/dev/null || true'


ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-ntfy \
ExecStart={{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-ntfy \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
--read-only \ --read-only \
--env NTFY_VISITOR_REQUEST_LIMIT_EXEMPT_HOSTS={{matrix_server_fqn_matrix}},localhost,$(docker network inspect {{matrix_docker_network}} -f "{{"{{"}} (index .IPAM.Config 0).Subnet {{"}}"}}") \
{% for arg in matrix_ntfy_container_extra_arguments %} {% for arg in matrix_ntfy_container_extra_arguments %}
{{ arg }} \ {{ arg }} \
{% endfor %} {% endfor %}
@@ -26,7 +27,7 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
--mount type=bind,src={{ matrix_ntfy_config_dir_path }},dst=/etc/ntfy,ro \ --mount type=bind,src={{ matrix_ntfy_config_dir_path }},dst=/etc/ntfy,ro \
--mount type=bind,src={{ matrix_ntfy_data_path }},dst=/data \ --mount type=bind,src={{ matrix_ntfy_data_path }},dst=/data \
{{ matrix_ntfy_docker_image }} \ {{ matrix_ntfy_docker_image }} \
serve
serve'


ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-ntfy 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-ntfy 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ntfy 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ntfy 2>/dev/null || true'


Laden…
Abbrechen
Speichern