-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
130 lines (118 loc) · 5.42 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
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
#
# docker-compose file for deploying GitLab in Docker.
#
version: '3.8'
services:
gitlab-server:
image: gitlab/gitlab-ce:16.10.1-ce.0
container_name: gitlab-server
hostname: gitlab.mydomain.com
environment:
TZ: UTC
GITLAB_POST_RECONFIGURE_SCRIPT: /mnt/custom-config/post-configuration.sh
GITLAB_OMNIBUS_CONFIG: |
# NGINX configurations.
letsencrypt['enable'] = false
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.mydomain.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.mydomain.com.key"
external_url 'https://gitlab.mydomain.com'
# Feature configurations.
gitlab_rails['gitlab_default_projects_features_issues'] = true
gitlab_rails['gitlab_default_projects_features_merge_requests'] = true
gitlab_rails['gitlab_default_projects_features_wiki'] = true
gitlab_rails['gitlab_default_projects_features_snippets'] = true
gitlab_rails['gitlab_default_projects_features_builds'] = true
gitlab_rails['gitlab_default_projects_features_container_registry'] = true
gitlab_rails['lfs_enabled'] = true
gitlab_rails['lfs_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/lfs-objects"
# Pages configurations.
gitlab_pages['enable'] = true
gitlab_pages['namespace_in_path'] = true
gitlab_pages['access_control'] = true
gitlab_pages['auth_scope'] = "read_api"
# DO NOT REPLACE 'projects.', its default.
gitlab_pages['auth_redirect_uri'] = "https://projects.gitlab-pages.mydomain.com/auth"
gitlab_rails['pages_path'] = "/var/opt/gitlab/gitlab-rails/shared/pages"
pages_external_url "https://gitlab-pages.mydomain.com/"
pages_nginx['enable'] = true
pages_nginx['listen_https'] = true
pages_nginx['redirect_http_to_https'] = true
pages_nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.mydomain.com.crt"
pages_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.mydomain.com.key"
# Docker registry configurations.
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "gitlab-registry.mydomain.com"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
registry_external_url 'https://gitlab-registry.mydomain.com'
registry_nginx['redirect_http_to_https'] = true
registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.mydomain.com.crt"
registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.mydomain.com.key"
# Logging configurations.
logging['svlogd_size'] = 50 * 1024 * 1024
logging['svlogd_num'] = 30
logging['svlogd_timeout'] = 24 * 60 * 60
logging['svlogd_filter'] = "gzip"
logging['logrotate_frequency'] = "daily"
logging['logrotate_maxsize'] = 50 * 1024 * 1024
logging['logrotate_size'] = 50 * 1024 * 1024
logging['logrotate_rotate'] = 30
logging['logrotate_compress'] = "compress"
logging['logrotate_method'] = "copytruncate"
logging['logrotate_dateformat'] = "-%Y%m%d-%s"
# Email configurations.
# gitlab_rails['smtp_enable'] = true
# gitlab_rails['gitlab_email_from'] = '[email protected]'
# gitlab_rails['smtp_address'] = "smtp.mydomain.com"
# gitlab_rails['smtp_port'] = 587
# gitlab_rails['smtp_user_name'] = "[email protected]"
# gitlab_rails['smtp_password'] = "SMTP_PASSWORD"
# gitlab_rails['smtp_domain'] = "gitlab.mydomain.com"
# gitlab_rails['smtp_authentication'] = "login"
# gitlab_rails['smtp_enable_starttls_auto'] = true
# gitlab_rails['smtp_tls'] = true
# Job Artifacts.
gitlab_rails['artifacts_enabled'] = true
gitlab_rails['artifacts_path'] = "/var/opt/gitlab/gitlab-rails/shared/artifacts"
# Common configurations.
gitlab_rails['time_zone'] = 'UTC'
gitlab_rails['gitlab_username_changing_enabled'] = false
gitlab_rails['gitlab_default_theme'] = 2
gitlab_rails['incoming_email_enabled'] = false
gitlab_rails['usage_ping_enabled'] = false
gitlab_rails['manage_backup_path'] = true
gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"
gitlab_rails['backup_archive_permissions'] = 0644
# Plantuml Server configurations.
nginx['custom_gitlab_server_config'] = "location /-/plantuml/ { \n rewrite ^/-/plantuml/(.*) /$1 break;\n proxy_cache off; \n proxy_pass http://plantuml-server:8080/; \n}\n"
gitlab_rails['env'] = { 'PLANTUML_ENCODING' => 'deflate' }
ports:
- 80:80
- 443:443
- 22:22
volumes:
- ./gitlab-data/config:/etc/gitlab
- ./gitlab-data/logs:/var/log/gitlab
- ./gitlab-data/data:/var/opt/gitlab
- ./gitlab-artifacts-data/artifacts:/var/opt/gitlab/gitlab-rails/shared/artifacts
- ./configs/certs:/etc/gitlab/ssl/
- ./configs:/mnt/custom-config
shm_size: 256m
restart: always
logging:
driver: json-file
options:
max-size: "50m"
max-file: "10"
links:
- plantuml-server
plantuml-server:
image: plantuml/plantuml-server:jetty-v1.2024.3
container_name: plantuml-server
hostname: plantuml-server
restart: always
logging:
driver: json-file
options:
max-size: "50m"
max-file: "10"