From 82fc4b96c1704894f1ac751d7fa01f7d1feecab0 Mon Sep 17 00:00:00 2001 From: Guwan Date: Fri, 19 Sep 2025 23:26:42 +0800 Subject: [PATCH] 1 --- 05/docker-compose.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 05/docker-compose.yml diff --git a/05/docker-compose.yml b/05/docker-compose.yml new file mode 100644 index 0000000..1745153 --- /dev/null +++ b/05/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3' + +services: + gitlab: + image: gitlab/gitlab-ce:12.4.2-ce.0 + container_name: gitlab-1 + restart: always + hostname: 'gitlab.example.com' + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url 'http://gitlab.example.com' + # LDAP配置 + gitlab_rails['ldap_enabled'] = true + gitlab_rails['ldap_servers'] = { + 'main' => { + 'label' => 'LDAP', + 'host' => '192.168.0.121', + 'port' => 389, + 'uid' => 'uid', + 'bind_dn' => 'cn=admin,dc=example,dc=com', + 'password' => '123456', + 'encryption' => 'plain', + 'base' => 'dc=example,dc=com', + 'active_directory' => false, + 'allow_username_or_email_login' => true, + 'lowercase_usernames' => false, + 'block_auto_created_users' => false, + 'user_filter' => '' + } + } + ports: + - '80:80' + - '443:443' + - '22:22' + volumes: + - './gitlab/config:/etc/gitlab' + - './gitlab/logs:/var/log/gitlab' + - './gitlab/data:/var/opt/gitlab' + shm_size: '256m' \ No newline at end of file