-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gitlab.yml
More file actions
87 lines (83 loc) · 2.65 KB
/
docker-compose.gitlab.yml
File metadata and controls
87 lines (83 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# GitLab + Runner for use with Traefik reverse proxy
# Use: docker compose -f docker-compose.gitlab.yml up -d
services:
gitlab:
image: gitlab/gitlab-ce:18.7.0-ce.0
hostname: gitlab
container_name: gitlab
networks:
gitlab-network:
ipv4_address: 172.31.0.2
restart: unless-stopped
ports:
- "2222:22"
volumes:
- gitlab-config:/etc/gitlab
- gitlab-data:/var/opt/gitlab
- ./docker/gitlab/scripts:/opt/scripts
- runner-config:/opt/runner-config
- ./docker/gitlab/local-gitlab.pub:/opt/local-gitlab.pub
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/-/readiness?all=1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 300s
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.localhost'
nginx['listen_port'] = 80
nginx['listen_https'] = false
gitlab_rails['trusted_proxies'] = ['172.31.0.10']
gitlab_rails['initial_root_password'] = ENV['GITLAB_ROOT_PASSWORD']
gitlab_rails['gitlab_shell_ssh_port'] = 2222
gitlab_rails['gitlab_ssh_host'] = 'localhost'
gitlab_rails['gitlab_ssh_user'] = 'git'
gitlab_rails['time_zone'] = 'Europe/Amsterdam'
gitlab_rails['lfs_enabled'] = true
gitlab_rails['gitlab_default_theme'] = 3
gitlab_rails['usage_ping_enabled'] = false
gitlab_rails['sentry_enabled'] = false
gitlab_rails['usage_ping_features_enabled'] = false
gitlab_rails['gitlab_experiment_enabled'] = false
gitlab_rails['version_check_enabled'] = false
gitlab_rails['update_notification_enabled'] = false
nginx['hsts_max_age'] = 0
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
entrypoint: ["/opt/scripts/entrypoint.sh"]
gitlab-runner:
image: gitlab/gitlab-runner:alpine3.21-511a9606
container_name: gitlab-runner
networks:
gitlab-network:
ipv4_address: 172.31.0.3
restart: unless-stopped
ports:
- "9252:9252"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker/gitlab-runner/scripts/entrypoint.sh:/opt/entrypoint.sh
- runner-config:/opt/runner-config
environment:
GITLAB_RUNNER_DEBUG_TRACE: "false"
entrypoint: ["/opt/entrypoint.sh"]
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
depends_on:
gitlab:
condition: service_healthy
networks:
gitlab-network:
name: gitlab-network
external: true
volumes:
gitlab-config:
gitlab-data:
runner-config:
external: true