template.yaml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. kind: compose
  2. metadata:
  3. name: GitLab
  4. description: 'A **complete DevOps platform** that provides Git repository management,
  5. CI/CD pipelines,
  6. issue tracking, and container registry in a single application.
  7. ## Prerequisites
  8. - ...
  9. **Performance Presets**:
  10. - `homelab`: Optimized for low-resource environments (limited workers, reduced
  11. PostgreSQL buffers)
  12. - `default`: Standard server configuration for production use
  13. **External URL**:
  14. - Set to your public domain (e.g., `https://gitlab.example.com`) for proper clone
  15. URLs
  16. - Affects SSH clone URLs and web links in emails/notifications
  17. **Container Registry**:
  18. - Enable if you need private Docker image hosting
  19. - Requires separate external URL (e.g., `https://registry.example.com`)
  20. ## Resources
  21. - **Project**: https://about.gitlab.com/
  22. - **Documentation**: https://docs.gitlab.com/
  23. - **Community**: https://forum.gitlab.com/'
  24. icon:
  25. provider: selfh
  26. id: gitlab
  27. version: 18.8.4-ce.0
  28. author: Christian Lempa
  29. date: '2026-02-10'
  30. tags:
  31. - traefik
  32. next_steps: "## Post-Installation Steps\n1. **Start GitLab**:\n ```bash\n docker\
  33. \ compose up -d\n ```\n2. **Wait for\\\n \\ initialization** (2-5 minutes):\n\
  34. \ ```bash\n docker compose logs -f gitlab\n ```\n Wait for message:\
  35. \ `gitlab\\\n \\ Reconfigured!`\n 3. **Access the web interface**:\n {% if\
  36. \ traefik_enabled -%}\n - Via Traefik: https://{{ traefik_host\\\n \\ }}\n\
  37. \ {% if not traefik_enabled and network_mode == 'bridge' %}- Direct access:\
  38. \ http://localhost:{{ ports_http }}{%\\\n \\ endif %}\n {%- else -%}\n \
  39. \ - Open {{ external_url }} in your browser\n {% if network_mode == 'bridge'\
  40. \ %}- Or: http://localhost:{{\\\n \\ ports_http }}{% endif %}\n {%- endif\
  41. \ %}\n 4. **Initial login credentials**:\n - **Username**: `root`\n - **Password**:\\\
  42. \n \\ `{{ root_password }}`\n > **Important**: This password only works on\
  43. \ FIRST initialization.\n > Change it immediately\\\n \\ after first login\
  44. \ via GitLab's web interface!\n 5. **Configure SSH** (optional):\n - SSH clone\
  45. \ URLs will use port `{{\\\n \\ ports_ssh }}`\n - Update your Git remote if\
  46. \ needed\n ## Additional Resources\n - Documentation: https://docs.gitlab.com/\n\
  47. \ \\\n - GitLab Runner: https://docs.gitlab.com/runner/"
  48. schema: '1.2'
  49. spec:
  50. general:
  51. vars:
  52. service_name:
  53. type: str
  54. description: Docker service name
  55. default: gitlab
  56. external_url:
  57. type: str
  58. description: External URL for GitLab
  59. default: http://localhost
  60. root_email:
  61. type: str
  62. description: Initial root user email address
  63. default: admin@example.com
  64. root_password:
  65. type: str
  66. description: Initial root user password (only used on first initialization)
  67. sensitive: true
  68. autogenerated: true
  69. extra: 'Leave empty to auto-generate. WARNING: Only sets password on FIRST
  70. startup!'
  71. default_theme:
  72. type: int
  73. description: Default GitLab UI theme (2 = dark mode)
  74. default: 2
  75. extra: 1 = Indigo, 2 = Dark, 3 = Light, 4 = Blue, 5 = Green
  76. default_color_mode:
  77. type: int
  78. description: Default color mode (2 = dark mode)
  79. default: 2
  80. extra: 1 = Light, 2 = Dark
  81. disable_usage_data:
  82. type: bool
  83. description: Disable product usage metrics upload to GitLab
  84. default: true
  85. restart_policy:
  86. type: enum
  87. options:
  88. - unless-stopped
  89. - always
  90. - on-failure
  91. - 'no'
  92. default: unless-stopped
  93. required: true
  94. advanced:
  95. title: Advanced Settings
  96. description: Performance tuning and advanced configuration options
  97. vars:
  98. performance_preset:
  99. type: enum
  100. description: Performance optimization profile
  101. options:
  102. - homelab
  103. - default
  104. default: homelab
  105. extra: homelab is optimized for low-resource environments, default is for
  106. standard servers
  107. prometheus_enabled:
  108. type: bool
  109. description: Enable Prometheus monitoring
  110. default: false
  111. extra: Disabling saves ~200-400MB RAM. GitLab UI metrics will be unavailable.
  112. toggle: prometheus_enabled
  113. ports:
  114. vars:
  115. ports_http:
  116. default: 80
  117. ports_ssh:
  118. default: 2424
  119. ports_registry:
  120. type: int
  121. description: Container Registry port
  122. default: 5000
  123. registry:
  124. description: GitLab Container Registry configuration
  125. toggle: registry_enabled
  126. vars:
  127. registry_enabled:
  128. type: bool
  129. description: Enable GitLab Container Registry
  130. default: false
  131. registry_external_url:
  132. type: str
  133. description: External URL for Container Registry
  134. default: http://localhost:5000
  135. traefik:
  136. vars:
  137. traefik_host:
  138. default: gitlab.home.arpa
  139. traefik_registry_host:
  140. needs:
  141. - registry_enabled=true
  142. default: registry.home.arpa
  143. type: str
  144. description: Hostname for Container Registry in Traefik (if enabled)
  145. traefik_network:
  146. default: traefik
  147. type: str
  148. required: true
  149. traefik_domain:
  150. default: home.arpa
  151. type: str
  152. required: true
  153. traefik_enabled:
  154. type: bool
  155. default: false
  156. description: Enable Traefik integration
  157. toggle: traefik_enabled
  158. title: Traefik
  159. description: Configure Traefik reverse proxy integration
  160. traefik_tls:
  161. vars:
  162. traefik_tls_certresolver:
  163. type: str
  164. default: cloudflare
  165. required: true
  166. traefik_tls_enabled:
  167. type: bool
  168. default: false
  169. description: Enable Traefik TLS
  170. toggle: traefik_tls_enabled
  171. title: Traefik TLS
  172. description: Configure Traefik TLS/SSL certificates
  173. needs: traefik
  174. email:
  175. toggle: email_enabled
  176. vars:
  177. email_enabled:
  178. type: bool
  179. default: false
  180. description: Enable email server configuration
  181. email_host:
  182. type: str
  183. default: ''
  184. description: SMTP server hostname
  185. email_port:
  186. type: int
  187. default: 587
  188. description: SMTP server port
  189. email_username:
  190. type: str
  191. default: ''
  192. description: SMTP username
  193. email_password:
  194. type: str
  195. sensitive: true
  196. default: ''
  197. description: SMTP password
  198. email_from:
  199. type: str
  200. default: ''
  201. description: From email address
  202. email_use_tls:
  203. type: bool
  204. default: true
  205. description: Use TLS encryption
  206. email_use_ssl:
  207. type: bool
  208. default: false
  209. description: Use SSL encryption
  210. authentik:
  211. toggle: authentik_enabled
  212. vars:
  213. authentik_enabled:
  214. type: bool
  215. default: false
  216. description: Enable Authentik SSO integration
  217. authentik_url:
  218. type: str
  219. default: https://auth.home.arpa
  220. description: Authentik base URL (e.g., https://auth.example.com)
  221. authentik_slug:
  222. type: str
  223. default: gitlab
  224. description: Authentik application slug
  225. authentik_client_id:
  226. type: str
  227. default: ''
  228. description: OAuth client ID from Authentik provider
  229. authentik_client_secret:
  230. type: str
  231. sensitive: true
  232. default: ''
  233. description: OAuth client secret from Authentik provider