# Change the external_url to the address your users will type in their browser
# if http
# external_url 'http://gitlab.local/'

# if https
external_url 'http://192.168.0.12/' # this should be the ip addess of gitlab server that can be accesssed from docker
nginx['redirect_http_to_https'] = false
nginx['ssl_certificate'] = "/etc/ssl/certs/ssl-cert-snakeoil.pem"
nginx['ssl_certificate_key'] = "/etc/ssl/private/ssl-cert-snakeoil.key"

#
# These settings are documented in more detail at
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example#L118
#
gitlab_rails['ldap_enabled'] = false
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
  main:
    host: 'ldap.host.here'
    port: 389
    uid: 'sAMAccountName'
    method: 'tls' # 'tls' or 'plain' or 'ssl'
    bind_dn: 'bind.user.here'
    password: 'bind.pass.here'
    active_directory: false
    allow_username_or_email_login: false
    base: 'bind.base.here'
    user_filter:
    attributes:
        username: [ 'sAMAccountName' ]
        email: [ 'mail', 'userPrincipalName' ]
        name: [ 'displayName' ]
EOS

# might want to disable this if ldap enabled
gitlab_rails['gitlab_signup_enabled'] = true
gitlab_rails['gitlab_signin_enabled'] = true

# limit the projects
gitlab_rails['gitlab_default_can_create_group'] = true
gitlab_rails['gitlab_default_projects_limit'] = 100
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

# keep backup for about 4 weeks
gitlab_rails['backup_keep_time'] = 2404800

# unicorn conf
unicorn['worker_processes'] = 2
unicorn['worker_timeout'] = 180

# runit logs
logging['svlogd_size'] = 100 * 1024 * 1024 # rotate after 200 MB of log data
logging['svlogd_num'] = 30 # keep 30 rotated log files
logging['svlogd_timeout'] = 24 * 60 * 60 # rotate after 24 hours
logging['svlogd_filter'] = "gzip" # compress logs with gzip
logging['svlogd_udp'] = nil # transmit log messages via UDP
logging['svlogd_prefix'] = nil # custom prefix for log messages
