From ad481b9f4fd0b348cb9f25392f9e865eaf939a7d Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Thu, 13 Jun 2024 14:34:02 +0200 Subject: [PATCH] gitlab - choose if you want traefik or not --- README.md | 1 + templates/compose/gitlab.yml.j2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 72ef18e..8f6643c 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Example variables - 10.0.1.0/24 redisinsignt_watchtower_enable: true + gitlab_through_traefik: true gitlab_image: gitlab/gitlab-ce gitlab_version: 'latest' gitlab_root_password: 'vault-this-thingy' diff --git a/templates/compose/gitlab.yml.j2 b/templates/compose/gitlab.yml.j2 index 30217de..845f4a9 100644 --- a/templates/compose/gitlab.yml.j2 +++ b/templates/compose/gitlab.yml.j2 @@ -22,6 +22,7 @@ services: container_name: gitlab restart: 'unless-stopped' labels: +{% if gitlab_through_traefik == "true" %} traefik.enable: "true" {% if gitlab_headers_accesscontrolallowcredentials is defined %} traefik.http.middlewares.gitlab.headers.accesscontrolallowcredentials: "{{ gitlab_headers_accesscontrolallowcredentials }}" @@ -50,6 +51,7 @@ services: traefik.http.routers.gitlab.middlewares: "clientips@docker" {% endif %} traefik.http.services.gitlab.loadbalancer.server.port: "80" +{% endif %} com.centurylinklabs.watchtower.enable: {{ gitlab_watchtower_enable | default('true') }} cap_add: - SYS_ADMIN