This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.services.yml
51 lines (49 loc) · 1.95 KB
/
docker-compose.services.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
version: '3.7'
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
container_name: gitlab
hostname: 'gitlab.company.ru'
environment:
# https://community.hetzner.com/tutorials/gitlab-server-with-docker#step-5-prepare-the-registry
# https://www.davd.io/byecloud-gitlab-with-docker-and-traefik/
# https://forum.gitlab.com/t/container-registry-behind-reverse-proxy/6848/2
GITLAB_OMNIBUS_CONFIG: |
grafana['enable'] = false
external_url "https://gitlab.company.ru"
nginx['proxy_set_headers'] = {
# $$ - экранирование $ в .yml для передачи в конфигурацию gitlab.rb
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
nginx['listen_port'] = 80
nginx['listen_https'] = false
gitlab_rails['time_zone'] = 'Europe/Volgograd'
gitlab_rails['trusted_proxies'] = ['192.168.88.1', '192.168.88.2']
registry_external_url 'https://registry.company.ru'
registry['enable'] =true
registry_nginx['enable'] = true
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"
}
registry_nginx['listen_port'] = 5005
registry_nginx['listen_https'] = false
nginx['real_ip_trusted_addresses'] = ['192.168.88.1', '192.168.88.2']
nginx['real_ip_header'] = 'X-Forwarded-For'
nginx['real_ip_recursive'] = 'on'
ports:
- '80:80'
- '1023:22'
- '5000:5005'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'