gitlab - update template : registry is optionnal && dissociate from traefik whitelist

This commit is contained in:
Ludovic Cartier 2023-09-18 12:00:38 +02:00
parent f3e871cb06
commit f22aed2e6a

View File

@ -23,12 +23,16 @@ services:
restart: 'unless-stopped' restart: 'unless-stopped'
labels: labels:
traefik.enable: "true" traefik.enable: "true"
{% if gitlab_registry is sameas true} %}
traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_domain }}`) || Host(`{{ gitlab_registry_domain }}`)" traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_domain }}`) || Host(`{{ gitlab_registry_domain }}`)"
{% else %}
traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_domain }}`)"
{% endif %}
traefik.http.routers.gitlab.tls: true traefik.http.routers.gitlab.tls: true
traefik.http.routers.gitlab.tls.certresolver: "letsencrypt" traefik.http.routers.gitlab.tls.certresolver: "letsencrypt"
traefik.http.routers.gitlab.entrypoints: "websecure" traefik.http.routers.gitlab.entrypoints: "websecure"
{% if traefik_ipwhitelist is defined %} {% if gitlab_ipwhitelist is defined %}
traefik.http.routers.grafana.middlewares: "clientips@docker" traefik.http.routers.gitlab.middlewares: "clientips@docker"
{% endif %} {% endif %}
traefik.http.services.gitlab.loadbalancer.server.port: "80" traefik.http.services.gitlab.loadbalancer.server.port: "80"
cap_add: cap_add: