-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
122 lines (118 loc) · 5.82 KB
/
Copy pathcompose.yaml
File metadata and controls
122 lines (118 loc) · 5.82 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
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
# Copyright (C) 2018-2026 Solution Libre <contact@solution-libre.fr>
#
# This file is part of GitLab with Docker Compose.
#
# GitLab with Docker Compose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GitLab with Docker Compose is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GitLab with Docker Compose. If not, see <https://www.gnu.org/licenses/>.
services:
web:
hostname: "${GITLAB_SUBDOMAIN}.${DOMAIN}"
image: gitlab/gitlab-ce:${GITLAB_VERSION}-ce.0
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url "https://${GITLAB_SUBDOMAIN}.${DOMAIN}"
gitlab_rails['external_diffs_enabled'] = true
gitlab_rails['extra_matomo_site_id'] = '5'
gitlab_rails['extra_matomo_url'] = 'matomo.solution-libre.fr'
gitlab_rails['gitlab_email_from'] = 'gitlab@${SMTP_DOMAIN}'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@${SMTP_DOMAIN}'
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_SSH_PORT}
gitlab_rails['object_store']['enabled'] = ${OBJECT_STORAGE_ENABLE:-false}
gitlab_rails['object_store']['connection'] = {
'provider' => 'AWS',
'endpoint' => '${OBJECT_STORAGE_ENDPOINT}',
'region' => '${OBJECT_STORAGE_REGION}',
'aws_access_key_id' => '${OBJECT_STORAGE_ACCESS_KEY}',
'aws_secret_access_key' => '${OBJECT_STORAGE_SECRET_KEY}'
}
gitlab_rails['object_store']['objects']['artifacts']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}artifacts'
gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}mr-diffs'
gitlab_rails['object_store']['objects']['lfs']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}lfs'
gitlab_rails['object_store']['objects']['uploads']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}uploads'
gitlab_rails['object_store']['objects']['packages']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}packages'
gitlab_rails['object_store']['objects']['dependency_proxy']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}dependency-proxy'
gitlab_rails['object_store']['objects']['terraform_state']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}terraform-state'
gitlab_rails['object_store']['objects']['ci_secure_files']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}ci-secure-files'
gitlab_rails['object_store']['objects']['pages']['bucket'] = '${OBJECT_STORAGE_BUCKET_PREFIX}pages'
gitlab_rails['object_store']['proxy_download'] = false
gitlab_rails['smtp_enable'] = ${SMTP_ENABLE:-false}
gitlab_rails['smtp_address'] = "${SMTP_ADDRESS}"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_domain'] = "${SMTP_DOMAIN}"
gitlab_rails['smtp_enable_starttls_auto'] = ${SMTP_ENABLE_STARTTLS_AUTO}
gitlab_rails['smtp_password'] = "${SMTP_USER_PASSWORD}"
gitlab_rails['smtp_port'] = ${SMTP_PORT}
gitlab_rails['smtp_tls'] = ${SMTP_TLS}
gitlab_rails['smtp_user_name'] = "${SMTP_USER_NAME}"
mattermost['enable'] = ${MATTERMOST_ENABLE:-false}
mattermost_external_url "https://${MATTERMOST_SUBDOMAIN}.${DOMAIN}"
mattermost_nginx['enable'] = false
mattermost['gitlab_auth_endpoint'] = "http://${GITLAB_SUBDOMAIN}.${DOMAIN}/oauth/authorize"
mattermost['gitlab_token_endpoint'] = "http://${GITLAB_SUBDOMAIN}.${DOMAIN}/oauth/token"
mattermost['gitlab_user_api_endpoint'] = "http://${GITLAB_SUBDOMAIN}.${DOMAIN}/api/v4/user"
mattermost['service_address'] = "0.0.0.0"
nginx['listen_port'] = '80'
nginx['listen_https'] = false
nginx['real_ip_trusted_addresses'] = ${NGINX_REAL_IP_TRUSTED_ADDRESSES:-[]}
registry['enable'] = ${REGISTRY_ENABLE:-false}
registry_external_url "https://${REGISTRY_SUBDOMAIN}.${DOMAIN}"
registry_nginx['enable'] = false
registry['registry_http_addr'] = "0.0.0.0:5000"
registry['storage'] = {
's3' => {
'accesskey' => '${REGISTRY_STORAGE_ACCESS_KEY}',
'bucket' => '${REGISTRY_STORAGE_BUCKET}',
'region' => '${REGISTRY_STORAGE_REGION}',
'regionendpoint' => '${REGISTRY_STORAGE_REGION_ENDPOINT}',
'secretkey' => '${REGISTRY_STORAGE_SECRET_KEY}'
}
}
labels:
# Traefik labels are suggested as an example for people using Traefik,
# remove them if you are using another reverse proxy.
traefik.enable: true
traefik.http.routers.gitlab.entrypoints: websecure
traefik.http.routers.gitlab.rule: "Host(`${GITLAB_SUBDOMAIN}.${DOMAIN}`)"
traefik.http.routers.gitlab.service: gitlab
traefik.http.routers.gitlab.tls.certresolver: myresolver
traefik.http.services.gitlab.loadbalancer.server.port: 80
networks:
default:
proxy:
ports:
- ${GITLAB_SSH_PORT}:22
# If you don't want to use a reverse proxy (not suitable for production!)
# - "80:80"
restart: unless-stopped
volumes:
- web_config:/etc/gitlab
- web_logs:/var/log/gitlab
- web_data:/var/opt/gitlab
runner:
image: gitlab/gitlab-runner:v${GITLAB_RUNNER_VERSION}
networks:
runner:
restart: unless-stopped
volumes:
- runner_config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
networks:
proxy:
external: true
name: ${NETWORK_NAME:-web}
runner:
volumes:
runner_config:
web_config:
web_data:
web_logs: