Просмотр исходного кода

pimp the traefik config.

pull/3257/head
Yan Minagawa 2 лет назад
Родитель
Сommit
222dd30e85
3 измененных файлов: 13 добавлений и 11 удалений
  1. +8
    -7
      roles/custom/matrix-bridge-appservice-polychat/defaults/main.yml
  2. +2
    -1
      roles/custom/matrix-bridge-appservice-polychat/tasks/validate_config.yml
  3. +3
    -3
      roles/custom/matrix-bridge-appservice-polychat/templates/labels.j2

+ 8
- 7
roles/custom/matrix-bridge-appservice-polychat/defaults/main.yml Просмотреть файл

@@ -6,11 +6,12 @@ matrix_appservice_polychat_enabled: true

matrix_appservice_polychat_scheme: https
matrix_appservice_polychat_hostname: ''
matrix_appservice_polychat_path_prefix: /appservice-polychat
matrix_appservice_polychat_appservice_path_prefix: 'appservice-polychat'
matrix_appservice_polychat_api_path_prefix: '/'

matrix_appservice_polychat_container_image_self_build: false
matrix_appservice_polychat_container_image_self_build_repo: "https://github.com/polychatproject/polychat-appservice.git"
matrix_appservice_polychat_container_image_self_build_repo_version: "{{ 'master' if matrix_appservice_polychat_version == 'latest' else matrix_appservice_polychat_version }}"
matrix_appservice_polychat_container_image_self_build_repo_version: "{{ 'main' if matrix_appservice_polychat_version == 'latest' else matrix_appservice_polychat_version }}"
matrix_appservice_polychat_container_image_self_build_repo_dockerfile_path: "Dockerfile"


@@ -31,7 +32,7 @@ matrix_appservice_polychat_data_path: "{{ matrix_appservice_polychat_base_path }
matrix_appservice_polychat_docker_src_files_path: "{{ matrix_appservice_polychat_base_path }}/docker-src"

# If nginx-proxy is disabled, the bridge itself expects its endpoint to be on its own domain (e.g. "localhost:6789")
matrix_appservice_polychat_public_endpoint: "{{ matrix_appservice_polychat_path_prefix }}"
matrix_appservice_polychat_public_endpoint: "{{ matrix_appservice_polychat_api_path_prefix }}"
matrix_appservice_polychat_inbound_uri_prefix: "{{ matrix_appservice_polychat_scheme }}://{{ matrix_appservice_polychat_hostname }}{{ matrix_appservice_polychat_public_endpoint }}"

matrix_appservice_polychat_user_prefix: '@polychat_'
@@ -66,8 +67,8 @@ matrix_appservice_polychat_container_labels_traefik_tls_certResolver: default #
# Controls whether labels will be added that expose matrix-appservice-polychats's public endpoints
matrix_appservice_polychat_container_labels_public_endpoint_enabled: true
matrix_appservice_polychat_container_labels_public_endpoint_hostname: "{{ matrix_appservice_polychat_hostname }}"
matrix_appservice_polychat_container_labels_public_endpoint_prefix: "{{ matrix_appservice_polychat_path_prefix }}"
matrix_appservice_polychat_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_appservice_polychat_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_polychat_path_prefix }}`)"
matrix_appservice_polychat_container_labels_public_endpoint_prefix: ""
matrix_appservice_polychat_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_appservice_polychat_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_polychat_api_path_prefix }}`)"
matrix_appservice_polychat_container_labels_public_endpoint_traefik_priority: 0
matrix_appservice_polychat_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_appservice_polychat_container_labels_traefik_entrypoints }}"
matrix_appservice_polychat_container_labels_public_endpoint_traefik_tls: "{{ matrix_appservice_polychat_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
@@ -76,8 +77,8 @@ matrix_appservice_polychat_container_labels_public_endpoint_traefik_tls_certReso
# Controls whether labels will be added that expose matrix-appservice-polychats's private endpoints
matrix_appservice_polychat_container_labels_private_endpoint_enabled: true
matrix_appservice_polychat_container_labels_private_endpoint_hostname: "{{ matrix_appservice_polychat_hostname }}"
matrix_appservice_polychat_container_labels_private_endpoint_prefix: "{{ matrix_appservice_polychat_path_prefix }}"
matrix_appservice_polychat_container_labels_private_endpoint_traefik_rule: "Host(`{{ matrix_appservice_polychat_container_labels_private_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_polychat_path_prefix }}`)"
matrix_appservice_polychat_container_labels_private_endpoint_prefix: "{{ matrix_appservice_polychat_appservice_path_prefix }}"
matrix_appservice_polychat_container_labels_private_endpoint_traefik_rule: "Host(`{{ matrix_appservice_polychat_container_labels_private_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_polychat_appservice_path_prefix }}`)"
matrix_appservice_polychat_container_labels_private_endpoint_traefik_priority: 0
matrix_appservice_polychat_container_labels_private_endpoint_traefik_entrypoints: "{{ matrix_appservice_polychat_container_labels_traefik_entrypoints }}"
matrix_appservice_polychat_container_labels_private_endpoint_traefik_tls: "{{ matrix_appservice_polychat_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"


+ 2
- 1
roles/custom/matrix-bridge-appservice-polychat/tasks/validate_config.yml Просмотреть файл

@@ -12,4 +12,5 @@
- matrix_appservice_polychat_id_token
- matrix_appservice_polychat_container_network
- matrix_appservice_polychat_hostname
- matrix_appservice_polychat_path_prefix
- matrix_appservice_polychat_appservice_path_prefix
- matrix_appservice_polychat_api_path_prefix

+ 3
- 3
roles/custom/matrix-bridge-appservice-polychat/templates/labels.j2 Просмотреть файл

@@ -24,7 +24,7 @@ traefik.http.routers.matrix-appservice-polychat-public.middlewares=matrix-appser
traefik.http.routers.matrix-appservice-polychat-public.priority={{ matrix_appservice_polychat_container_labels_public_endpoint_traefik_priority }}
{% endif %}

traefik.http.routers.matrix-appservice-polychat-public.service=matrix-appservice-polychat
traefik.http.routers.matrix-appservice-polychat-public.service=matrix-appservice-polychat-api
traefik.http.routers.matrix-appservice-polychat-public.entrypoints={{ matrix_appservice_polychat_container_labels_public_endpoint_traefik_entrypoints }}

traefik.http.routers.matrix-appservice-polychat-public.tls={{ matrix_appservice_polychat_container_labels_public_endpoint_traefik_tls | to_json }}
@@ -55,7 +55,7 @@ traefik.http.routers.matrix-appservice-polychat-private.middlewares=matrix-appse
traefik.http.routers.matrix-appservice-polychat-private.priority={{ matrix_appservice_polychat_container_labels_private_endpoint_traefik_priority }}
{% endif %}

traefik.http.routers.matrix-appservice-polychat-private.service=matrix-appservice-polychat
traefik.http.routers.matrix-appservice-polychat-private.service=matrix-appservice-polychat-appservice
traefik.http.routers.matrix-appservice-polychat-private.entrypoints={{ matrix_appservice_polychat_container_labels_private_endpoint_traefik_entrypoints }}

traefik.http.routers.matrix-appservice-polychat-private.tls={{ matrix_appservice_polychat_container_labels_private_endpoint_traefik_tls | to_json }}
@@ -65,7 +65,7 @@ traefik.http.routers.matrix-appservice-polychat-private.tls.certResolver={{ matr

############################################################
# #
# /Private #
# /Private #
# #
############################################################
{% endif %}


Загрузка…
Отмена
Сохранить