-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample.docker-compose.yml
180 lines (163 loc) · 8.26 KB
/
sample.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
services:
gitlab:
image: gitlab/gitlab-ce
restart: always
networks:
- vcs
- webproxy
ports:
- "${GITLAB_SHELL_SSH_PORT:-10022}:22"
volumes:
- ${GL_HOME:-.}/gitlab/config:/etc/gitlab
- ${GL_HOME:-.}/gitlab/logs:/var/log/gitlab
- ${GL_HOME:-.}/gitlab/data:/var/opt/gitlab
labels:
- traefik.enable=true
- traefik.docker.network=webproxy
- traefik.http.services.gitlab.loadbalancer.server.port=80
- traefik.http.routers.gitlab.entrypoints=web
- traefik.http.routers.gitlab.rule=Host(`gitlab.${GL_DOMAIN}`) || Host(`mattermost.${GL_DOMAIN}`) || Host(`glcr.${GL_DOMAIN}`)
- traefik.http.routers.gitlab.middlewares=http2https@file
- traefik.http.routers.gitlab-sec.entrypoints=websecure
- traefik.http.routers.gitlab-sec.rule=Host(`gitlab.${GL_DOMAIN}`) || Host(`mattermost.${GL_DOMAIN}`) || Host(`glcr.${GL_DOMAIN}`)
- traefik.http.routers.gitlab-sec.middlewares=sts@file
- traefik.http.routers.gitlab-sec.tls.certresolver=${GL_CERTRESOLVER_NAME}
environment:
GITLAB_OMNIBUS_CONFIG: |
## GitLab URL
external_url 'https://gitlab.${GL_DOMAIN}'
## gitlab.yml configuration
gitlab_rails['time_zone'] = '${GL_TZ:-UTC}'
### Email Settings
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = 'gitlab@${GL_DOMAIN}'
gitlab_rails['gitlab_email_display_name'] = 'GitLab'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@${GL_DOMAIN}'
### Default project feature settings
gitlab_rails['gitlab_default_projects_features_builds'] = false
gitlab_rails['gitlab_default_projects_features_container_registry'] = false
### Reply by email
#gitlab_rails['incoming_email_enabled'] = true
#### Incoming Email Address
#gitlab_rails['incoming_email_address'] = "gitlab-incoming+%{key}@gmail.com"
#### Email account username
#gitlab_rails['incoming_email_email'] = "[email protected]"
#### Email account password
#gitlab_rails['incoming_email_password'] = "[REDACTED]"
#### IMAP Settings
#gitlab_rails['incoming_email_host'] = "imap.gmail.com"
#gitlab_rails['incoming_email_port'] = 993
#gitlab_rails['incoming_email_ssl'] = true
#gitlab_rails['incoming_email_start_tls'] = false
#### Incoming Mailbox Settings
#gitlab_rails['incoming_email_mailbox_name'] = "inbox"
#gitlab_rails['incoming_email_idle_timeout'] = 60
### GitLab Shell settings for GitLab
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_SHELL_SSH_PORT:-10022}
### GitLab application settings
gitlab_rails['initial_root_password'] = "${GL_INITIAL_ROOT_PASSWORD:-password}"
#gitlab_rails['initial_shared_runners_registration_token'] = "${GL_INITIAL_SHARED_RUNNERS_REGISTRATION_TOKEN}"
### GitLab email server settings
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "${GL_SMTP_ADDRESS:-gitlab-smtp}"
gitlab_rails['smtp_port'] = ${GL_SMTP_PORT:-8025}
#gitlab_rails['smtp_user_name'] = "gitlab@${GL_DOMAIN}"
#gitlab_rails['smtp_password'] = "${GL_SMTP_PASSWORD}"
#gitlab_rails['smtp_domain'] = "${GL_DOMAIN}"
#gitlab_rails['smtp_authentication'] = "login"
#gitlab_rails['smtp_enable_starttls_auto'] = true
#gitlab_rails['smtp_tls'] = false
#gitlab_rails['smtp_openssl_verify_mode'] = 'none'
## Container Registry settings
registry_external_url 'https://glcr.${GL_DOMAIN}'
### Settings used by GitLab application
gitlab_rails['registry_enabled'] = true
## GitLab PostgreSQL
postgresql['shared_buffers'] = "256MB"
## GitLab NGINX
#nginx['listen_addresses'] = ['0.0.0.0', '[::]']
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {
"Host" => "$$http_host_with_default",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
## GitLab Mattermost
mattermost_external_url 'https://mattermost.${GL_DOMAIN}'
mattermost['enable'] = true
mattermost['team_site_name'] = "GitLab Mattermost"
mattermost['gitlab_enable'] = true
mattermost['gitlab_id'] = "${MM_GITLAB_APPLICATION_ID}"
mattermost['gitlab_secret'] = "${MM_GITLAB_SECRET}"
mattermost['gitlab_auth_endpoint'] = "https://gitlab.${GL_DOMAIN}/oauth/authorize"
mattermost['gitlab_token_endpoint'] = "https://gitlab.${GL_DOMAIN}/oauth/token"
mattermost['gitlab_user_api_endpoint'] = "https://gitlab.${GL_DOMAIN}/api/v4/user"
mattermost['env'] = {
'MM_SERVICESETTINGS_SITEURL' => 'https://mattermost.${GL_DOMAIN}',
'MM_SERVICESETTINGS_ENABLEINCOMINGWEBHOOKS' => 'true',
'MM_SERVICESETTINGS_ENABLEPOSTUSERNAMEOVERRIDE' => 'true',
'MM_SERVICESETTINGS_ENABLEPOSTICONOVERRIDE' => 'true',
'MM_SERVICESETTINGS_ENABLELINKPREVIEWS' => 'true',
'MM_SERVICESETTINGS_ENABLEUSERACCESSTOKENS' => 'true',
'MM_TEAMSETTINGS_TEAMMATENAMEDISPLAY' => 'full_name',
'MM_FILESETTINGS_ENABLEPUBLICLINK' => 'true',
#'MM_FILESETTINGS_PUBLICLINKSALT' => '${MM_PUBLIC_LINK_SALT}',
'MM_EMAILSETTINGS_ENABLESIGNUPWITHEMAIL' => 'false',
'MM_EMAILSETTINGS_ENABLESIGNINWITHEMAIL' => 'false',
'MM_EMAILSETTINGS_ENABLESIGNINWITHUSERNAME' => 'false',
'MM_EMAILSETTINGS_SENDEMAILNOTIFICATIONS' => 'true',
'MM_EMAILSETTINGS_FEEDBACKNAME' => 'GitLab Mattermost Notification',
'MM_EMAILSETTINGS_FEEDBACKEMAIL' => 'gitlab@${GL_DOMAIN}',
'MM_EMAILSETTINGS_REPLYTOADDRESS' => 'noreply@${GL_DOMAIN}',
#'MM_EMAILSETTINGS_FEEDBACKORGANIZATION' => '© Company, Address No., Zip City',
#'MM_EMAILSETTINGS_ENABLESMTPAUTH' => 'true',
#'MM_EMAILSETTINGS_SMTPUSERNAME' => 'gitlab@${GL_DOMAIN}',
#'MM_EMAILSETTINGS_SMTPPASSWORD' => '${GL_SMTP_PASSWORD}',
'MM_EMAILSETTINGS_SMTPSERVER' => '${GL_SMTP_ADDRESS:-gitlab-smtp}',
'MM_EMAILSETTINGS_SMTPPORT' => '${GL_SMTP_PORT:-8025}',
#'MM_EMAILSETTINGS_CONNECTIONSECURITY' => 'STARTTLS',
'MM_SUPPORTSETTINGS_SUPPORTEMAIL' => 'support@${GL_DOMAIN}',
'MM_PLUGINSETTINGS_ENABLEUPLOADS' => 'true',
}
## Mattermost NGINX
mattermost_nginx['enable'] = true
#mattermost_nginx['listen_addresses'] = ['*', '[::]']
mattermost_nginx['listen_port'] = 80
mattermost_nginx['listen_https'] = false
mattermost_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"
}
## Container Registry NGINX
registry_nginx['enable'] = true
#registry_nginx['listen_addresses'] = ['*', '[::]']
registry_nginx['listen_port'] = 80
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"
}
gitlab-runner:
image: gitlab/gitlab-runner
restart: always
volumes:
- ${GL_HOME:-.}/gitlab-runner/config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
gitlab-smtp:
image: devture/exim-relay:4.92.2-r0-0
user: 100:101
restart: always
networks:
vcs:
external: true
webproxy:
external: true