-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
91 lines (78 loc) · 2.65 KB
/
docker-compose.yml
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
88
89
90
version: '3'
services:
traefik:
image: traefik:latest
restart: always
command: --docker
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/etc/traefik/traefik.toml
- ./acme.json:/acme.json
gitlab:
image: gitlab/gitlab-ce:latest
restart: always
hostname: gitlab.YOUR_DOMAIN.com
healthcheck:
disable: true
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.YOUR_DOMAIN.com'
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['http2_enabled'] = false
nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_rails['gitlab_shell_ssh_port'] = 22
registry_external_url 'https://registry.gitlab.YOUR_DOMAIN.com'
registry_nginx['listen_port'] = 5100
registry_nginx['listen_https'] = false
registry_nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
pages_external_url 'https://pages.gitlab.YOUR_DOMAIN.com'
pages_nginx['listen_port'] = 5200
pages_nginx['listen_https'] = false
pages_nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_pages['inplace_chroot'] = true
gitlab_pages['external_http'] = ['gitlab:5201']
volumes:
- gitlab-config:/etc/gitlab
- gitlab-logs:/var/log/gitlab
- gitlab-data:/var/opt/gitlab
labels:
- traefik.enable=true
- traefik.gitlab.frontend.rule=Host:gitlab.YOUR_DOMAIN.com
- traefik.gitlab.port=80
- traefik.registry.frontend.rule=Host:registry.gitlab.YOUR_DOMAIN.com
- traefik.registry.port=5100
- traefik.pages.frontend.rule=Host:pages.gitlab.YOUR_DOMAIN.com,bilal.pages.gitlab.YOUR_DOMAIN.com
- traefik.pages.port=5201
gitlab-runner:
image: gitlab/gitlab-runner:alpine
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./runner.toml:/etc/gitlab-runner/config.toml
volumes:
gitlab-config:
gitlab-logs:
gitlab-data:
gitlab-runner-data: