Add native Traefik support to Sygnal

This commit is contained in:
Slavi Pantaleev
2023-02-26 11:03:42 +02:00
parent eb213c1195
commit d20ff688db
11 changed files with 206 additions and 43 deletions

View File

@ -1,28 +1,77 @@
---
# Sygnal is a reference Push Gateway for Matrix.
# To make use of it for delivering push notificatins, you'll need to develop/build your own Matrix app.
# Project source code URL: https://github.com/matrix-org/sygnal
matrix_sygnal_enabled: false
matrix_sygnal_enabled: true
# The hostname at which Sygnal is served.
matrix_sygnal_hostname: ''
# The path at which Sygnal is exposed.
# This value must either be `/` or not end with a slash (e.g. `/sygnal`).
matrix_sygnal_path_prefix: /
matrix_sygnal_version: v0.12.0
matrix_sygnal_base_path: "{{ matrix_base_data_path }}/sygnal"
matrix_sygnal_config_path: "{{ matrix_sygnal_base_path }}/config"
matrix_sygnal_data_path: "{{ matrix_sygnal_base_path }}/data"
matrix_sygnal_version: v0.12.0
matrix_sygnal_docker_image: "{{ matrix_container_global_registry_prefix }}matrixdotorg/sygnal:{{ matrix_sygnal_version }}"
matrix_sygnal_docker_image_force_pull: "{{ matrix_sygnal_docker_image.endswith(':latest') }}"
# List of systemd services that matrix-sygnal.service depends on.
matrix_sygnal_systemd_required_services_list: ['docker.service']
# List of systemd services that matrix-sygnal.service wants
matrix_sygnal_systemd_wanted_services_list: []
matrix_sygnal_docker_image: "{{ matrix_sygnal_docker_image_registry_prefix }}matrixdotorg/sygnal:{{ matrix_sygnal_docker_image_tag }}"
matrix_sygnal_docker_image_tag: "{{ matrix_sygnal_version }}"
matrix_sygnal_docker_image_registry_prefix: "{{ matrix_container_global_registry_prefix }}"
matrix_sygnal_docker_image_force_pull: "{{ matrix_sygnal_docker_image.endswith(':latest') }}"
# The base container network. It will be auto-created by this role if it doesn't exist already.
matrix_sygnal_container_network: "{{ matrix_sygnal_identifier }}"
# A list of additional container networks that the container would be connected to.
# The role does not create these networks, so make sure they already exist.
# Use this to expose this container to another reverse proxy, which runs in a different container network.
matrix_sygnal_container_additional_networks: []
# Controls whether the matrix-sygnal container exposes its HTTP port (tcp/6000 in the container).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:6000"), or empty string to not expose.
matrix_sygnal_container_http_host_bind_port: ''
# matrix_sygnal_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
# See `../templates/labels.j2` for details.
#
# To inject your own other container labels, see `matrix_sygnal_container_labels_additional_labels`.
matrix_sygnal_container_labels_traefik_enabled: true
matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_sygnal_container_network }}"
matrix_sygnal_container_labels_traefik_hostname: "{{ matrix_sygnal_hostname }}"
# The path prefix must either be `/` or not end with a slash (e.g. `/sygnal`).
matrix_sygnal_container_labels_traefik_path_prefix: "{{ matrix_sygnal_path_prefix }}"
matrix_sygnal_container_labels_traefik_rule: "Host(`{{ matrix_sygnal_container_labels_traefik_hostname }}`){% if matrix_sygnal_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_sygnal_container_labels_traefik_path_prefix }}`){% endif %}"
matrix_sygnal_container_labels_traefik_priority: 0
matrix_sygnal_container_labels_traefik_entrypoints: web-secure
matrix_sygnal_container_labels_traefik_tls: "{{ matrix_sygnal_container_labels_traefik_entrypoints != 'web' }}"
matrix_sygnal_container_labels_traefik_tls_certResolver: default # noqa var-naming
# Controls which additional headers to attach to all HTTP responses.
# To add your own headers, use `matrix_sygnal_container_labels_traefik_additional_response_headers_custom`
matrix_sygnal_container_labels_traefik_additional_response_headers: "{{ matrix_sygnal_container_labels_traefik_additional_response_headers_auto | combine(matrix_sygnal_container_labels_traefik_additional_response_headers_custom) }}"
matrix_sygnal_container_labels_traefik_additional_response_headers_auto: {}
matrix_sygnal_container_labels_traefik_additional_response_headers_custom: {}
# matrix_sygnal_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
#
# Example:
# matrix_sygnal_container_labels_additional_labels: |
# my.label=1
# another.label="here"
matrix_sygnal_container_labels_additional_labels: ''
# A list of extra arguments to pass to the container
matrix_sygnal_container_extra_arguments: []