2023-03-17 10:34:15 +01:00
|
|
|
{% if nextcloud_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if nextcloud_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ nextcloud_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
2023-11-21 15:23:48 +01:00
|
|
|
{% for middleware in nextcloud_container_labels_traefik_http_middlewares | sort (attribute='priority,name') %}
|
|
|
|
{% for key, value in middleware.config.items() %}
|
|
|
|
traefik.http.middlewares.{{ middleware.name }}.{{ middleware.type }}.{{ middleware.config_key_prefix | default('') }}{{ key }}={{ value }}
|
2023-03-17 10:34:15 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.rule={{ nextcloud_container_labels_traefik_rule }}
|
|
|
|
{% if nextcloud_container_labels_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.priority={{ nextcloud_container_labels_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.service={{ nextcloud_identifier }}
|
2023-11-21 15:23:48 +01:00
|
|
|
{% if nextcloud_container_labels_traefik_http_middlewares | length > 0 %}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.middlewares={{ nextcloud_container_labels_traefik_http_middlewares | sort (attribute='priority,name') | map(attribute='name') | join(',') }}
|
2023-03-17 10:34:15 +01:00
|
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.entrypoints={{ nextcloud_container_labels_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.tls={{ nextcloud_container_labels_traefik_tls | to_json }}
|
|
|
|
{% if nextcloud_container_labels_traefik_tls %}
|
|
|
|
traefik.http.routers.{{ nextcloud_identifier }}.tls.certResolver={{ nextcloud_container_labels_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.services.{{ nextcloud_identifier }}.loadbalancer.server.port=80
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ nextcloud_container_labels_additional_labels }}
|