diff --git a/defaults/main.yml b/defaults/main.yml index a3267a4..dd8ee4f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,3 +2,4 @@ docker_roundcube_aspell_dicts: fr docker_roundcube_oauth_login_redirect: "true" docker_roundcube_oauth_scope: "profile email" docker_roundcube_oauth_identity_fields_array: "['email']" +docker_roundcube_traefik_enable_ssl: false diff --git a/templates/docker-compose.yml b/templates/docker-compose.yml index 7abc88b..6c2bdd0 100644 --- a/templates/docker-compose.yml +++ b/templates/docker-compose.yml @@ -14,7 +14,12 @@ services: labels: - "traefik.enable=true" - "traefik.docker.network=traefik" +{% if docker_roundcube_traefik_enable_ssl %} + - "traefik.http.routers.{{ docker_roundcube_service_id }}.entrypoints=websecure" + - "traefik.http.routers.{{ docker_roundcube_service_id }}.tls" +{% else %} - "traefik.http.routers.{{ docker_roundcube_service_id }}.entrypoints=web" +{% endif %} - "traefik.http.routers.{{ docker_roundcube_service_id }}.rule=Host(`{{ docker_roundcube_fqdn }}`)" - "traefik.http.services.{{ docker_roundcube_service_id }}.loadbalancer.server.port=80" networks: