Просмотр исходного кода

Merge pull request #564 from ChristianLempa/557-enhance-gitlab-compose-to-add-container-registry

initial gitlab deployment
Christian Lempa 1 год назад
Родитель
Сommit
b261ea2be9
2 измененных файлов с 110 добавлено и 0 удалено
  1. 52 0
      docker-compose/gitlab/compose.yaml
  2. 58 0
      docker-compose/gitlab/config/gitlab.rb

+ 52 - 0
docker-compose/gitlab/compose.yaml

@@ -0,0 +1,52 @@
+---
+services:
+  gitlab:
+    image: gitlab/gitlab-ce:17.6.1-ce.0
+    container_name: gitlab
+    shm_size: '256m'
+    environment: {}
+    # --> (Optional) When using traefik...
+    # networks:
+    #   - frontend
+    # <--
+    volumes:
+      - ./config:/etc/gitlab
+      - ./logs:/var/log/gitlab
+      - gitlab-data:/var/opt/gitlab
+    ports:
+    # --> (Optional) Remove when using traefik...
+      - "80:80"
+      - "443:443"
+    # <--
+      - '2424:22'
+    # --> (Optional) When using traefik...
+    # labels:
+    #   - traefik.enable=true
+    #   - traefik.http.services.gitlab.loadbalancer.server.port=80
+    #   - traefik.http.services.gitlab.loadbalancer.server.scheme=http
+    #   - traefik.http.routers.gitlab.service=gitlab      
+    #   - traefik.http.routers.gitlab.rule=Host(`your-gitlab-fqdn`)
+    #   - traefik.http.routers.gitlab.entrypoints=websecure
+    #   - traefik.http.routers.gitlab.tls=true
+    #   - traefik.http.routers.gitlab.tls.certresolver=cloudflare
+    # <--
+    # --> (Optional) Enable Container Registry settings here...
+    #   - traefik.http.services.registry.loadbalancer.server.port=5678
+    #   - traefik.http.services.registry.loadbalancer.server.scheme=http
+    #   - traefik.http.routers.registry.service=registry
+    #   - traefik.http.routers.registry.rule=Host(`your-registry-fqdn`)
+    #   - traefik.http.routers.registry.entrypoints=websecure
+    #   - traefik.http.routers.registry.tls=true
+    #   - traefik.http.routers.registry.tls.certresolver=cloudflare
+    # <--
+    restart: unless-stopped
+
+volumes:
+  gitlab-data:
+    driver: local
+
+# --> (Optional) When using traefik...
+# networks:
+#   frontend:
+#     external: true
+# <--

+ 58 - 0
docker-compose/gitlab/config/gitlab.rb

@@ -0,0 +1,58 @@
+# -- Change GitLab settings here...
+external_url 'https://your-gitlab-fqdn'  # <-- Replace with your GitLab FQDN
+
+# -- (Optional) Change GitLab Shell settings here...
+gitlab_rails['gitlab_shell_ssh_port'] = 2424
+
+# -- Change internal web service settings here...
+letsencrypt['enable'] = false
+nginx['listen_port']  = 80
+nginx['listen_https'] = false
+
+# --> (Optional) Enable Container Registry settings here...
+# registry_external_url 'https://your-registry-fqdn'  # <-- Replace with your registry FQDN
+# gitlab_rails['registry_enabled']  = true
+# registry_nginx['listen_https']    = false
+# registry_nginx['listen_port']     = 5678  # <-- Replace with your registry port
+# <--
+
+# --> (Optional) Add Authentik settings here...
+# gitlab_rails['omniauth_auto_link_user'] = ['openid_connect']
+# gitlab_rails['omniauth_providers'] = [
+#   {
+#     name: "openid_connect",  #  !-- Do not change this parameter
+#     label: "Authentik",  # <-- (Optional) Change name for login button, defaults to "Openid Connect"
+#     icon: "https://avatars.githubusercontent.com/u/82976448?s=200&v=4",
+#     args: {
+#       name: "openid_connect",
+#       scope: ["openid","profile","email"],
+#       response_type: "code",
+#       issuer: "https://your-authentik-fqdn/application/o/your-gitlab-slug/",  # <-- Replace with your Authentik FQDN and GitLab slug
+#       discovery: true,
+#       client_auth_method: "query",
+#       uid_field: "email",
+#       send_scope_to_token_endpoint: "false",
+#       pkce: true,
+#       client_options: {
+#         identifier: "your-authentik-provider-client-id",  # <-- Replace with your Authentik provider client ID
+#         secret: "your-authentik-provider-client-secret",  # <-- Replace with your Authentik provider client secret
+#         redirect_uri: "https://your-authentik-fqdn/users/auth/openid_connect/callback"  # <-- Replace with your Authentik FQDN
+#       }
+#     }
+#   }
+# ]
+# <--
+
+# --> (Optional) Change SMTP settings here...
+# gitlab_rails['smtp_enable']           = true
+# gitlab_rails['smtp_address']          = "your-smtp-server-addr"  # <-- Replace with your SMTP server address
+# gitlab_rails['smtp_port']             = 465
+# gitlab_rails['smtp_user_name']        = "your-smtp-username"  # <-- Replace with your SMTP username
+# gitlab_rails['smtp_password']         = "your-smtp-password"  # <-- Replace with your SMTP password
+# gitlab_rails['smtp_domain']           = "your-smtp-domain"  # <-- Replace with your SMTP domain
+# gitlab_rails['smtp_authentication']   = "login"
+# gitlab_rails['smtp_ssl']              = true
+# gitlab_rails['smtp_force_ssl']        = true
+# gitlab_rails['gitlab_email_from']     = 'your-email-from-addr'  # <-- Replace with your email from address
+# gitlab_rails['gitlab_email_reply_to'] = 'your-email-replyto-addr'  # <-- Replace with your email reply-to address
+# <--