template.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ---
  2. kind: compose
  3. metadata:
  4. name: GitLab
  5. description: >
  6. GitLab is a web-based DevOps lifecycle tool that provides a Git repository
  7. manager providing wiki, issue-tracking, and CI/CD pipeline features, using
  8. an open-source license, developed by GitLab Inc.
  9. Project: https://about.gitlab.com/
  10. Documentation: https://docs.gitlab.com/
  11. version: 18.4.2-ce.0
  12. author: Christian Lempa
  13. date: '2025-10-08'
  14. tags:
  15. - git
  16. - ci-cd
  17. next_steps: |
  18. 1. Start GitLab:
  19. docker compose up -d
  20. 2. Wait for GitLab to initialize (this may take 2-5 minutes)
  21. 3. Access the web interface:
  22. {% if traefik_enabled -%}
  23. - Via Traefik: https://{{ traefik_host }}
  24. {% if ports_enabled %}- Direct access: http://localhost:{{ ports_http }}{% endif %}
  25. {%- else -%}
  26. - Open {{ external_url }} in your browser
  27. {% if ports_enabled %}- Or: http://localhost:{{ ports_http }}{% endif %}
  28. {%- endif %}
  29. 4. Initial login:
  30. - Username: root
  31. - Retrieve initial password:
  32. docker exec {{ container_name }} grep 'Password: ' /etc/gitlab/initial_root_password
  33. IMPORTANT: Change this password immediately after first login!
  34. For more information, visit: https://docs.gitlab.com/
  35. spec:
  36. general:
  37. vars:
  38. service_name:
  39. default: "gitlab"
  40. container_name:
  41. default: "gitlab"
  42. external_url:
  43. type: str
  44. description: External URL for GitLab (e.g., https://gitlab.example.com)
  45. default: https://gitlab.example.com
  46. ssh_port:
  47. type: int
  48. description: SSH port for Git operations
  49. default: 2424
  50. ports:
  51. vars:
  52. ports_enabled:
  53. type: bool
  54. description: Expose HTTP/HTTPS ports
  55. default: true
  56. ports_http:
  57. type: int
  58. description: HTTP port
  59. default: 80
  60. ports_https:
  61. type: int
  62. description: HTTPS port
  63. default: 443
  64. ports_registry:
  65. type: int
  66. description: Port for Container Registry
  67. default: 5678
  68. traefik:
  69. vars:
  70. traefik_host:
  71. default: gitlab.home.arpa
  72. traefik_registry_host:
  73. default: registry.home.arpa
  74. type: str
  75. description: Hostname for Container Registry in Traefik (if enabled)
  76. registry:
  77. description: GitLab Container Registry configuration
  78. required: false
  79. toggle: registry_enabled
  80. vars:
  81. registry_enabled:
  82. type: bool
  83. description: Enable GitLab Container Registry
  84. default: false
  85. registry_external_url:
  86. type: str
  87. description: External URL for Container Registry
  88. default: https://registry.example.com
  89. advanced:
  90. title: Advanced Settings
  91. description: Performance tuning and advanced configuration options
  92. required: false
  93. vars:
  94. performance_preset:
  95. type: enum
  96. description: Performance optimization profile
  97. options:
  98. - homelab
  99. - default
  100. default: homelab
  101. extra: homelab is optimized for low-resource environments, default is for standard servers
  102. prometheus_enabled:
  103. type: bool
  104. description: Enable Prometheus monitoring
  105. default: false
  106. extra: Disabling saves ~200-400MB RAM. GitLab UI metrics will be unavailable.