Expose mautrix-discord's avatar proxy
Possibly fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3900 This patch hasn't been tested.
This commit is contained in:
@ -0,0 +1,58 @@
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_enabled %}
|
||||
traefik.enable=true
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_docker_network %}
|
||||
traefik.docker.network={{ matrix_mautrix_discord_container_labels_traefik_docker_network }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.services.matrix-mautrix-discord.loadbalancer.server.port=8080
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Avatar proxy #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
{% set middlewares = [] %}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.regex=({{ matrix_mautrix_discord_container_labels_traefik_path_prefix | quote }})$
|
||||
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.replacement=${1}/
|
||||
{% set middlewares = middlewares + ['matrix-mautrix-discord-slashless-redirect'] %}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-mautrix-discord-strip-prefix.stripprefix.prefixes={{ matrix_mautrix_discord_container_labels_traefik_path_prefix }}
|
||||
{% set middlewares = middlewares + ['matrix-mautrix-discord-strip-prefix'] %}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.rule={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_rule }}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.priority={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority }}
|
||||
{% endif %}
|
||||
|
||||
{% if middlewares | length > 0 %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.middlewares={{ middlewares | join(',') }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.service=matrix-mautrix-discord
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.entrypoints={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints }}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls | to_json }}
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls.certResolver={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Avatar proxy #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ matrix_mautrix_discord_container_labels_additional_labels }}
|
@ -23,6 +23,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--network={{ matrix_mautrix_discord_container_network }} \
|
||||
--label-file={{ matrix_mautrix_discord_base_path }}/labels \
|
||||
--mount type=bind,src={{ matrix_mautrix_discord_config_path }},dst=/config,ro \
|
||||
--mount type=bind,src={{ matrix_mautrix_discord_data_path }},dst=/data \
|
||||
--workdir=/data \
|
||||
|
Reference in New Issue
Block a user