update
This commit is contained in:
@@ -0,0 +1 @@
|
||||
GITLAB_ROOT_PASSWORD=<< root_password >>
|
||||
@@ -0,0 +1,65 @@
|
||||
services:
|
||||
<< service_name >>:
|
||||
image: docker.io/gitlab/gitlab-ce:18.11.2-ce.0
|
||||
restart: << restart_policy >>
|
||||
shm_size: '256m'
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
<< traefik_network >>:
|
||||
<%- endif %>
|
||||
ports:
|
||||
<%- if not traefik_enabled %>
|
||||
- "<< ports_http >>:80"
|
||||
<%- endif %>
|
||||
- "<< ports_ssh >>:22"
|
||||
<%- if registry_enabled and not traefik_enabled %>
|
||||
- "<< ports_registry >>:5000"
|
||||
<%- endif %>
|
||||
volumes:
|
||||
- ./config/gitlab.rb:/etc/gitlab/gitlab.rb:ro
|
||||
- << service_name >>_config:/etc/gitlab
|
||||
- << service_name >>_logs:/var/log/gitlab
|
||||
- << service_name >>_data:/var/opt/gitlab
|
||||
<%- if traefik_enabled %>
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=<< traefik_network >>
|
||||
- traefik.http.services.<< service_name >>_web.loadBalancer.server.port=80
|
||||
- traefik.http.routers.<< service_name >>_http.service=<< service_name >>_web
|
||||
- traefik.http.routers.<< service_name >>_http.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>_http.entrypoints=<< traefik_entrypoint >>
|
||||
<%- if traefik_tls_enabled %>
|
||||
- traefik.http.routers.<< service_name >>_https.service=<< service_name >>_web
|
||||
- traefik.http.routers.<< service_name >>_https.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>_https.entrypoints=<< traefik_tls_entrypoint >>
|
||||
- traefik.http.routers.<< service_name >>_https.tls=true
|
||||
- traefik.http.routers.<< service_name >>_https.tls.certresolver=<< traefik_tls_certresolver >>
|
||||
<%- endif %>
|
||||
<%- if registry_enabled %>
|
||||
- traefik.http.services.<< service_name >>_registry.loadBalancer.server.port=5000
|
||||
- traefik.http.routers.<< service_name >>_registry-http.service=<< service_name >>_registry
|
||||
- traefik.http.routers.<< service_name >>_registry-http.rule=Host(`<< traefik_registry_host >>`)
|
||||
- traefik.http.routers.<< service_name >>_registry-http.entrypoints=<< traefik_entrypoint >>
|
||||
<%- if traefik_tls_enabled %>
|
||||
- traefik.http.routers.<< service_name >>_registry-https.service=<< service_name >>_registry
|
||||
- traefik.http.routers.<< service_name >>_registry-https.rule=Host(`<< traefik_registry_host >>`)
|
||||
- traefik.http.routers.<< service_name >>_registry-https.entrypoints=<< traefik_tls_entrypoint >>
|
||||
- traefik.http.routers.<< service_name >>_registry-https.tls=true
|
||||
- traefik.http.routers.<< service_name >>_registry-https.tls.certresolver=<< traefik_tls_certresolver >>
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
|
||||
volumes:
|
||||
<< service_name >>_config:
|
||||
driver: local
|
||||
<< service_name >>_logs:
|
||||
driver: local
|
||||
<< service_name >>_data:
|
||||
driver: local
|
||||
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
<< traefik_network >>:
|
||||
external: true
|
||||
<%- endif %>
|
||||
@@ -0,0 +1,94 @@
|
||||
# GitLab Configuration
|
||||
external_url '<< external_url >>'
|
||||
|
||||
# Initial root user configuration (only used on first initialization)
|
||||
gitlab_rails['initial_root_password'] = '<< root_password >>'
|
||||
gitlab_rails['initial_root_email'] = '<< root_email >>'
|
||||
|
||||
# GitLab Shell SSH settings
|
||||
gitlab_rails['gitlab_shell_ssh_port'] = << ports_ssh >>
|
||||
|
||||
# Let's Encrypt and built-in TLS settings are currently not supported by the template
|
||||
# as we are using Traefik as a reverse proxy
|
||||
letsencrypt['enable'] = false
|
||||
nginx['listen_port'] = 80
|
||||
nginx['listen_https'] = false
|
||||
|
||||
<%- if traefik_tls_enabled %>
|
||||
# Traefik settings, to redirect http to https
|
||||
nginx['redirect_http_to_https'] = true
|
||||
<%- endif %>
|
||||
|
||||
<%- if registry_enabled %>
|
||||
# Container Registry settings
|
||||
registry_external_url '<< registry_external_url >>'
|
||||
gitlab_rails['registry_enabled'] = true
|
||||
registry_nginx['listen_https'] = false
|
||||
registry_nginx['listen_port'] = 5000
|
||||
<%- endif %>
|
||||
|
||||
<%- if authentik_enabled %>
|
||||
# Authentik SSO settings
|
||||
gitlab_rails['omniauth_auto_link_user'] = ['openid_connect']
|
||||
gitlab_rails['omniauth_providers'] = [
|
||||
{
|
||||
name: "openid_connect",
|
||||
label: "Authentik",
|
||||
icon: "https://avatars.githubusercontent.com/u/82976448?s=200&v=4",
|
||||
args: {
|
||||
name: "openid_connect",
|
||||
scope: ["openid","profile","email"],
|
||||
response_type: "code",
|
||||
issuer: "<< authentik_url >>/application/o/<< authentik_slug >>/",
|
||||
discovery: true,
|
||||
client_auth_method: "query",
|
||||
uid_field: "email",
|
||||
send_scope_to_token_endpoint: "false",
|
||||
pkce: true,
|
||||
client_options: {
|
||||
identifier: "<< authentik_client_id >>",
|
||||
secret: "<< authentik_client_secret >>",
|
||||
redirect_uri: "<< external_url >>/users/auth/openid_connect/callback"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
<%- endif %>
|
||||
|
||||
<%- if email_enabled %>
|
||||
# SMTP settings
|
||||
gitlab_rails['smtp_enable'] = true
|
||||
gitlab_rails['smtp_address'] = "<< email_host >>"
|
||||
gitlab_rails['smtp_port'] = << email_port >>
|
||||
gitlab_rails['smtp_user_name'] = "<< email_username >>"
|
||||
gitlab_rails['smtp_password'] = "<< email_password >>"
|
||||
gitlab_rails['smtp_authentication'] = "login"
|
||||
<%- if email_use_ssl %>
|
||||
gitlab_rails['smtp_ssl'] = true
|
||||
gitlab_rails['smtp_force_ssl'] = true
|
||||
<%- elif email_use_tls %>
|
||||
gitlab_rails['smtp_tls'] = true
|
||||
<%- endif %>
|
||||
gitlab_rails['gitlab_email_from'] = '<< email_from >>'
|
||||
gitlab_rails['gitlab_email_reply_to'] = '<< email_from >>'
|
||||
<%- endif %>
|
||||
|
||||
<%- if performance_preset == 'homelab' %>
|
||||
# Performance optimizations for homelab/low-resource environments
|
||||
# NOTE: These settings reduce resource usage but may impact performance under high load
|
||||
postgresql['shared_buffers'] = "256MB"
|
||||
sidekiq['max_concurrency'] = 4
|
||||
sidekiq['concurrency'] = 1
|
||||
puma['worker_timeout'] = 120
|
||||
puma['worker_processes'] = 1
|
||||
<%- endif %>
|
||||
|
||||
# Prometheus monitoring
|
||||
prometheus_monitoring['enable'] = << prometheus_enabled | lower >>
|
||||
|
||||
# Default UI settings
|
||||
gitlab_rails['gitlab_default_theme'] = << default_theme >>
|
||||
gitlab_rails['gitlab_default_color_mode'] = << default_color_mode >>
|
||||
|
||||
# Product usage data
|
||||
gitlab_rails['initial_gitlab_product_usage_data'] = <%- if disable_usage_data %>false<%- else %>true<%- endif %>
|
||||
@@ -0,0 +1,428 @@
|
||||
{
|
||||
"slug": "gitlab",
|
||||
"kind": "compose",
|
||||
"metadata": {
|
||||
"name": "GitLab",
|
||||
"description": "Complete DevOps platform providing Git repository management, CI/CD pipelines, issue tracking, and an optional container registry in a single application.",
|
||||
"tags": [
|
||||
"traefik"
|
||||
],
|
||||
"icon": {
|
||||
"provider": "selfhst",
|
||||
"id": "gitlab"
|
||||
},
|
||||
"draft": false,
|
||||
"version": {
|
||||
"name": "18.11.2-ce.0",
|
||||
"source_dep_name": "docker.io/gitlab/gitlab-ce",
|
||||
"source_dep_version": "18.11.2-ce.0"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "General",
|
||||
"name": "general",
|
||||
"items": [
|
||||
{
|
||||
"name": "service_name",
|
||||
"type": "str",
|
||||
"title": "Service Name",
|
||||
"required": false,
|
||||
"default": "gitlab",
|
||||
"config": {
|
||||
"placeholder": "gitlab"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "external_url",
|
||||
"type": "str",
|
||||
"title": "External URL",
|
||||
"required": false,
|
||||
"default": "http://localhost",
|
||||
"config": {
|
||||
"placeholder": "http://localhost"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "root_email",
|
||||
"type": "str",
|
||||
"title": "Root Email",
|
||||
"required": true,
|
||||
"description": "Initial root user email address",
|
||||
"config": {
|
||||
"placeholder": "admin@home.arpa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "root_password",
|
||||
"type": "secret",
|
||||
"title": "Root Password",
|
||||
"required": false,
|
||||
"description": "Initial root user password (only used on first initialization)",
|
||||
"config": {
|
||||
"autogenerated": {
|
||||
"length": 32
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default_theme",
|
||||
"type": "int",
|
||||
"title": "UI Theme",
|
||||
"required": false,
|
||||
"default": 2,
|
||||
"description": "Default GitLab UI theme (2 = dark mode)",
|
||||
"config": {
|
||||
"placeholder": "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default_color_mode",
|
||||
"type": "int",
|
||||
"title": "Color Mode",
|
||||
"required": false,
|
||||
"default": 2,
|
||||
"description": "Default color mode (2 = dark mode)",
|
||||
"config": {
|
||||
"placeholder": "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "disable_usage_data",
|
||||
"type": "bool",
|
||||
"title": "Usage Data",
|
||||
"required": false,
|
||||
"default": true,
|
||||
"description": "Disable product usage metrics upload to GitLab"
|
||||
},
|
||||
{
|
||||
"name": "restart_policy",
|
||||
"type": "enum",
|
||||
"title": "Restart Policy",
|
||||
"required": true,
|
||||
"default": "unless-stopped",
|
||||
"config": {
|
||||
"options": [
|
||||
"unless-stopped",
|
||||
"always",
|
||||
"on-failure",
|
||||
"no"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Advanced Settings",
|
||||
"name": "advanced",
|
||||
"items": [
|
||||
{
|
||||
"name": "performance_preset",
|
||||
"type": "enum",
|
||||
"title": "Performance optimization profile",
|
||||
"required": false,
|
||||
"default": "homelab",
|
||||
"config": {
|
||||
"options": [
|
||||
"homelab",
|
||||
"default"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "prometheus_enabled",
|
||||
"type": "bool",
|
||||
"title": "Prometheus",
|
||||
"required": false,
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Ports",
|
||||
"name": "ports",
|
||||
"items": [
|
||||
{
|
||||
"name": "ports_http",
|
||||
"type": "str",
|
||||
"title": "HTTP Port",
|
||||
"required": false,
|
||||
"default": 80,
|
||||
"config": {
|
||||
"placeholder": "80"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ports_ssh",
|
||||
"type": "str",
|
||||
"title": "Ports Ssh",
|
||||
"required": false,
|
||||
"default": 2424,
|
||||
"config": {
|
||||
"placeholder": "2424"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ports_registry",
|
||||
"type": "int",
|
||||
"title": "Container Registry port",
|
||||
"required": false,
|
||||
"default": 5000,
|
||||
"config": {
|
||||
"placeholder": "5000"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Registry",
|
||||
"toggle": "registry_enabled",
|
||||
"name": "registry",
|
||||
"items": [
|
||||
{
|
||||
"name": "registry_enabled",
|
||||
"type": "bool",
|
||||
"title": "Registry",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "registry_external_url",
|
||||
"type": "str",
|
||||
"title": "Registry URL",
|
||||
"required": false,
|
||||
"default": "http://localhost:5000",
|
||||
"description": "External URL for Container Registry",
|
||||
"config": {
|
||||
"placeholder": "http://localhost:5000"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Traefik",
|
||||
"name": "traefik",
|
||||
"toggle": "traefik_enabled",
|
||||
"items": [
|
||||
{
|
||||
"name": "traefik_enabled",
|
||||
"type": "bool",
|
||||
"title": "Traefik",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "traefik_host",
|
||||
"type": "str",
|
||||
"title": "Host",
|
||||
"required": true,
|
||||
"config": {
|
||||
"placeholder": "gitlab"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "traefik_registry_host",
|
||||
"type": "str",
|
||||
"title": "Registry Host",
|
||||
"required": false,
|
||||
"default": "registry.home.arpa",
|
||||
"description": "Hostname for Container Registry in Traefik (if enabled)",
|
||||
"needs": [
|
||||
"registry_enabled=true"
|
||||
],
|
||||
"config": {
|
||||
"placeholder": "registry.home.arpa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "traefik_domain",
|
||||
"type": "str",
|
||||
"title": "Domain",
|
||||
"required": true,
|
||||
"config": {
|
||||
"placeholder": "home.arpa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "traefik_entrypoint",
|
||||
"type": "str",
|
||||
"title": "Entrypoint",
|
||||
"required": true,
|
||||
"default": "web",
|
||||
"config": {
|
||||
"placeholder": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "traefik_network",
|
||||
"type": "str",
|
||||
"title": "Network",
|
||||
"required": true,
|
||||
"default": "traefik",
|
||||
"config": {
|
||||
"placeholder": "traefik"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "traefik_tls_enabled",
|
||||
"type": "bool",
|
||||
"title": "TLS",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "traefik_tls_entrypoint",
|
||||
"type": "str",
|
||||
"title": "TLS Entrypoint",
|
||||
"required": true,
|
||||
"default": "websecure",
|
||||
"config": {
|
||||
"placeholder": "websecure"
|
||||
},
|
||||
"needs": [
|
||||
"traefik_tls_enabled=true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "traefik_tls_certresolver",
|
||||
"type": "str",
|
||||
"title": "Cert Resolver",
|
||||
"required": true,
|
||||
"default": "cloudflare",
|
||||
"config": {
|
||||
"placeholder": "cloudflare"
|
||||
},
|
||||
"needs": [
|
||||
"traefik_tls_enabled=true"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Email",
|
||||
"toggle": "email_enabled",
|
||||
"name": "email",
|
||||
"items": [
|
||||
{
|
||||
"name": "email_enabled",
|
||||
"type": "bool",
|
||||
"title": "Email",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "email_host",
|
||||
"type": "str",
|
||||
"title": "SMTP server hostname",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"config": {
|
||||
"placeholder": "smtp.home.arpa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "email_port",
|
||||
"type": "int",
|
||||
"title": "SMTP server port",
|
||||
"required": false,
|
||||
"default": 587,
|
||||
"config": {
|
||||
"placeholder": "587"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "email_username",
|
||||
"type": "str",
|
||||
"title": "SMTP username",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"config": {
|
||||
"placeholder": "user@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "email_password",
|
||||
"type": "secret",
|
||||
"title": "SMTP password",
|
||||
"required": false,
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "email_from",
|
||||
"type": "str",
|
||||
"title": "From email address",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"config": {
|
||||
"placeholder": "noreply@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "email_use_tls",
|
||||
"type": "bool",
|
||||
"title": "SMTP TLS",
|
||||
"required": false,
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "email_use_ssl",
|
||||
"type": "bool",
|
||||
"title": "SMTP SSL",
|
||||
"required": false,
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Authentik",
|
||||
"toggle": "authentik_enabled",
|
||||
"name": "authentik",
|
||||
"items": [
|
||||
{
|
||||
"name": "authentik_enabled",
|
||||
"type": "bool",
|
||||
"title": "Authentik SSO",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "authentik_url",
|
||||
"type": "str",
|
||||
"title": "Auth URL",
|
||||
"required": false,
|
||||
"default": "https://auth.home.arpa",
|
||||
"description": "Authentik base URL (e.g., https://auth.home.arpa)",
|
||||
"config": {
|
||||
"placeholder": "https://auth.home.arpa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "authentik_slug",
|
||||
"type": "str",
|
||||
"title": "Authentik application slug",
|
||||
"required": false,
|
||||
"default": "gitlab",
|
||||
"config": {
|
||||
"placeholder": "gitlab"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "authentik_client_id",
|
||||
"type": "str",
|
||||
"title": "Client ID",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"description": "OAuth client ID from Authentik provider"
|
||||
},
|
||||
{
|
||||
"name": "authentik_client_secret",
|
||||
"type": "secret",
|
||||
"title": "Client Secret",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"description": "OAuth client secret from Authentik provider"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user