added gitlab to my setup and configured it

This commit is contained in:
rezayaghobi-dev
2026-08-07 23:45:59 +03:30
parent 1c5997246a
commit 0f5a5f06ac
10 changed files with 1987 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
concurrent = 4
check_interval = 0
shutdown_timeout = 0
listen_address = ":9252"
[session_server]
session_timeout = 1800
[[runners]]
name = "docker-runner"
url = "http://192.168.100.6:8929"
id = 3
token = "paste your token here "
token_obtained_at = 2026-08-06T16:15:46Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "docker"
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
AssumeRoleMaxConcurrency = 0
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
pull_policy = "if-not-present"
helper_image = "gitlab/gitlab-runner-helper:x86_64-latest"
tls_verify = false
image = "alpine:latest"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
volume_keep = false
shm_size = 0
network_mtu = 0

View File

@@ -0,0 +1,51 @@
services:
gitlab:
image: gitlab/gitlab-ce:19.2.1-ce.0
container_name: gitlab
restart: unless-stopped
hostname: gitlab.local
ports:
- "8929:80"
- "2224:22"
volumes:
- ./config:/etc/gitlab
- ./logs:/var/log/gitlab
- ./data:/var/opt/gitlab
shm_size: '256m'
environment:
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['monitoring_whitelist'] = ['127.0.0.1', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
external_url 'http://192.168.100.6:8929'
nginx['listen_port'] = 80
nginx['listen_https'] = false
gitlab_rails['gitlab_shell_ssh_port'] = 2224
# Trim workers for a 4-core / 8GB host
puma['worker_processes'] = 2
puma['min_threads'] = 1
puma['max_threads'] = 4
sidekiq['max_concurrency'] = 10
postgresql['shared_buffers'] = "256MB"
# You already have this stack running — turn GitLab's copies off
prometheus_monitoring['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
gitlab_exporter['enable'] = false
# Registry off for now — flip to true later if you want it
registry['enable'] = false
gitlab-runner:
image: gitlab/gitlab-runner:latest
container_name: gitlab-runner
restart: unless-stopped
ports:
- "9252:9252"
volumes:
- ./runner-config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock

View File

@@ -0,0 +1,23 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
- job_name: 'node_exporter'
static_configs:
- targets: ['node-exporter:9100']
- job_name: 'gitlab'
metrics_path: '/-/metrics'
static_configs:
- targets: ['192.168.100.6:8929']
- job_name: 'gitlab-runner'
static_configs:
- targets: ['192.168.100.6:9252'] # Or your runner container name/IP