准备数据目录
mkdir -p /srv/gitlab/config /srv/gitlab/logs /srv/gitlab/data
docker-compose.yml文件
gitlabCE: image: gitlab/gitlab-ce dns: 172.17.42.1 ports: - "8443:443" - "8008:80" - "2222:22" volumes: - /srv/gitlab/config:/etc/gitlab - /srv/gitlab/logs:/var/log/gitlab - /srv/gitlab/data:/var/opt/gitlab environment: - PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
配置ldap登陆
gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: '10.x.xx.xx' port: 389 uid: 'sAMAccountName' method: 'plain' # "tls" or "ssl" or "plain" bind_dn: 'cn=sysop,ou=zol,dc=office,dc=zol' password: 'password' active_directory: true allow_username_or_email_login: false block_auto_created_users: false base: 'ou=zol,dc=office,dc=zol' user_filter: '' EOS
|