Quellcode durchsuchen

gitlab template updates

xcad vor 4 Monaten
Ursprung
Commit
dc62b1ee18

+ 4 - 4
library/compose/gitlab/compose.yaml.j2

@@ -36,20 +36,20 @@ services:
       - traefik.http.routers.{{ container_name }}-https.tls=true
       - traefik.http.routers.{{ container_name }}-https.tls.certresolver={{ traefik_tls_certresolver }}
       {% endif %}
-{% if registry_enabled %}
+  {% if registry_enabled %}
       - traefik.http.services.{{ container_name }}-registry.loadbalancer.server.port={{ ports_registry }}
       - traefik.http.services.{{ container_name }}-registry.loadbalancer.server.scheme=http
       - traefik.http.routers.{{ container_name }}-registry-http.service={{ container_name }}-registry
-      - traefik.http.routers.{{ container_name }}-registry-http.rule=Host(`{{ registry_hostname }}`)
+      - traefik.http.routers.{{ container_name }}-registry-http.rule=Host(`{{ traefik_registry_host }}`)
       - traefik.http.routers.{{ container_name }}-registry-http.entrypoints={{ traefik_entrypoint }}
       {% if traefik_tls_enabled %}
       - traefik.http.routers.{{ container_name }}-registry-https.service={{ container_name }}-registry
-      - traefik.http.routers.{{ container_name }}-registry-https.rule=Host(`{{ registry_hostname }}`)
+      - traefik.http.routers.{{ container_name }}-registry-https.rule=Host(`{{ traefik_registry_host }}`)
       - traefik.http.routers.{{ container_name }}-registry-https.entrypoints={{ traefik_tls_entrypoint }}
       - traefik.http.routers.{{ container_name }}-registry-https.tls=true
       - traefik.http.routers.{{ container_name }}-registry-https.tls.certresolver={{ traefik_tls_certresolver }}
       {% endif %}
-{% endif %}
+  {% endif %}
 {% endif %}
     restart: {{ restart_policy }}
 

+ 3 - 1
library/compose/gitlab/config/gitlab.rb.j2

@@ -4,9 +4,11 @@ external_url '{{ external_url }}'
 # GitLab Shell SSH settings
 gitlab_rails['gitlab_shell_ssh_port'] = {{ ssh_port }}
 
+# Let's Encrypt settings are currently not supported by the template
+letsencrypt['enable'] = false
+
 {% if traefik_enabled %}
 # Traefik settings
-letsencrypt['enable'] = false
 nginx['listen_port']  = 80
 nginx['listen_https'] = false
 nginx['redirect_http_to_https'] = true

+ 28 - 3
library/compose/gitlab/template.yaml

@@ -15,11 +15,33 @@ metadata:
     Documentation: https://docs.gitlab.com/
   version: 18.3.1-ce.0
   author: Christian Lempa
-  date: '2025-09-28'
+  date: '2025-10-07'
   tags:
     - git
     - ci-cd
-  draft: true
+  next_steps: |
+    1. Start GitLab:
+       docker compose up -d
+
+    2. Wait for GitLab to initialize (this may take 2-5 minutes)
+
+    3. Access the web interface:
+       {% if traefik_enabled -%}
+       - Via Traefik: https://{{ traefik_host }}
+       {% if ports_enabled %}- Direct access: http://localhost:{{ ports_http }}{% endif %}
+       {%- else -%}
+       - Open {{ external_url }} in your browser
+       {% if ports_enabled %}- Or: http://localhost:{{ ports_http }}{% endif %}
+       {%- endif %}
+
+    4. Initial login:
+       - Username: root
+       - Retrieve initial password:
+         docker exec {{ container_name }} grep 'Password:' /etc/gitlab/initial_root_password
+
+       IMPORTANT: Change this password immediately after first login!
+
+    For more information, visit: https://docs.gitlab.com/
 spec:
   general:
     vars:
@@ -53,11 +75,14 @@ spec:
         type: int
         description: Port for Container Registry
         default: 5678
-
   traefik:
     vars:
       traefik_host:
         default: gitlab.home.arpa
+      traefik_registry_host:
+        default: registry.home.arpa
+        type: str
+        description: Hostname for Container Registry in Traefik (if enabled)
   registry:
     description: GitLab Container Registry configuration
     required: false