| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- ---
- kind: compose
- metadata:
- name: GitLab
- description: |
- A **complete DevOps platform** that provides Git repository management, CI/CD pipelines,
- issue tracking, and container registry in a single application.
- ## Prerequisites
- - ...
- **Performance Presets**:
- - `homelab`: Optimized for low-resource environments (limited workers, reduced PostgreSQL buffers)
- - `default`: Standard server configuration for production use
- **External URL**:
- - Set to your public domain (e.g., `https://gitlab.example.com`) for proper clone URLs
- - Affects SSH clone URLs and web links in emails/notifications
- **Container Registry**:
- - Enable if you need private Docker image hosting
- - Requires separate external URL (e.g., `https://registry.example.com`)
- ## Resources
- - **Project**: https://about.gitlab.com/
- - **Documentation**: https://docs.gitlab.com/
- - **Community**: https://forum.gitlab.com/
- icon:
- provider: selfh
- id: gitlab
- version: 18.5.4-ce.0
- author: Christian Lempa
- date: '2025-12-11'
- tags:
- - traefik
- - swarm
- next_steps: |
- ## Post-Installation Steps
- 1. **Start GitLab**:
- ```bash
- docker compose up -d
- ```
- 2. **Wait for initialization** (2-5 minutes):
- ```bash
- docker compose logs -f gitlab
- ```
- Wait for message: `gitlab Reconfigured!`
- 3. **Access the web interface**:
- {% if traefik_enabled -%}
- - Via Traefik: https://{{ traefik_host }}
- {% if not traefik_enabled and network_mode == 'bridge' %}- Direct access: http://localhost:{{ ports_http }}{% endif %}
- {%- else -%}
- - Open {{ external_url }} in your browser
- {% if network_mode == 'bridge' %}- Or: http://localhost:{{ ports_http }}{% endif %}
- {%- endif %}
- 4. **Initial login credentials**:
- - **Username**: `root`
- - **Password**: `{{ root_password }}`
- > **Important**: This password only works on FIRST initialization.
- > Change it immediately after first login via GitLab's web interface!
- 5. **Configure SSH** (optional):
- - SSH clone URLs will use port `{{ ports_ssh }}`
- - Update your Git remote if needed
- ## Additional Resources
- - Documentation: https://docs.gitlab.com/
- - GitLab Runner: https://docs.gitlab.com/runner/
- draft: true
- schema: "1.2"
- spec:
- general:
- vars:
- service_name:
- default: "gitlab"
- external_url:
- type: str
- description: External URL for GitLab
- default: http://localhost
- root_email:
- type: str
- description: Initial root user email address
- default: admin@example.com
- root_password:
- type: str
- description: Initial root user password (only used on first initialization)
- sensitive: true
- autogenerated: true
- extra: "Leave empty to auto-generate. WARNING: Only sets password on FIRST startup!"
- default_theme:
- type: int
- description: Default GitLab UI theme (2 = dark mode)
- default: 2
- extra: "1 = Indigo, 2 = Dark, 3 = Light, 4 = Blue, 5 = Green"
- default_color_mode:
- type: int
- description: Default color mode (2 = dark mode)
- default: 2
- extra: "1 = Light, 2 = Dark"
- disable_usage_data:
- type: bool
- description: Disable product usage metrics upload to GitLab
- default: true
- ports:
- vars:
- ports_ssh:
- default: 2424
- ports_registry:
- type: int
- description: Container Registry port
- default: 5000
- network:
- vars:
- network_name:
- default: "gitlab_network"
- traefik:
- vars:
- traefik_host:
- default: gitlab.home.arpa
- traefik_registry_host:
- needs: ["registry_enabled=true"]
- default: registry.home.arpa
- type: str
- description: Hostname for Container Registry in Traefik (if enabled)
- registry:
- description: GitLab Container Registry configuration
- toggle: registry_enabled
- vars:
- registry_enabled:
- type: bool
- description: Enable GitLab Container Registry
- default: false
- registry_external_url:
- type: str
- description: External URL for Container Registry
- default: http://localhost:5000
- advanced:
- title: Advanced Settings
- description: Performance tuning and advanced configuration options
- vars:
- performance_preset:
- type: enum
- description: Performance optimization profile
- options:
- - homelab
- - default
- default: homelab
- extra: homelab is optimized for low-resource environments, default is for standard servers
- prometheus_enabled:
- type: bool
- description: Enable Prometheus monitoring
- default: false
- extra: Disabling saves ~200-400MB RAM. GitLab UI metrics will be unavailable.
|