2017-10-04 1 views
0

で複数行ラインの設定は、環境のvar GITLAB_OMNIBUS_CONFIG LDAPの複数行のYAML設定に追加することはできません。gitlabドッキングウィンドウのコンファイル

# Add any other gitlab.rb configuration here, each on its own line 
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' 
main: 
    label: 'LDAP' 
    host: 'ldap.<>.local' 
    port: 389 
    uid: 'uid' 
    bind_dn: 'uid=<>,ou=People,dc=,dc=' 
    password: '<>' 
    encryption: 'plain' # "start_tls" or "simple_tls" or "plain" 
    base: '<>' 
    attributes: 
    username: ['uid', 'userid', 'sAMAccountName'] 
    email: ['mail', 'email', 'userPrincipalName'] 
    name:  'cn' 
    first_name: 'givenName' 
    last_name: 'sn' 
EOS 

ソリューションはありますか?

答えて

0

PS:私は

をフォーマットする必要があるとして、答えとして投稿コメントあなたは下記てみましたか?

version: '3' 
services: 
    nginx: 
    environment: 
     GITLAB_OMNIBUS_CONFIG: | 
     gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' 
     main: 
      label: 'LDAP' 
      host: 'ldap.<>.local' 
      port: 389 
      uid: 'uid' 
      bind_dn: 'uid=<>,ou=People,dc=,dc=' 
      password: '<>' 
      encryption: 'plain' # "start_tls" or "simple_tls" or "plain" 
      base: '<>' 
      attributes: 
      username: ['uid', 'userid', 'sAMAccountName'] 
      email: ['mail', 'email', 'userPrincipalName'] 
      name:  'cn' 
      first_name: 'givenName' 
      last_name: 'sn' 
     EOS 
    image: nginx 

そして、それは罰金

$ docker-compose config 
services: 
    nginx: 
    environment: 
     GITLAB_OMNIBUS_CONFIG: "gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'\n\ 
     main:\n label: 'LDAP'\n host: 'ldap.<>.local'\n port: 389\n uid: 'uid'\n\ 
     \ bind_dn: 'uid=<>,ou=People,dc=,dc='\n password: '<>'\n encryption: 'plain'\ 
     \ # \"start_tls\" or \"simple_tls\" or \"plain\"\n base: '<>'\n attributes:\n\ 
     \ username: ['uid', 'userid', 'sAMAccountName']\n email: ['mail',\ 
     \ 'email', 'userPrincipalName']\n name:  'cn'\n first_name: 'givenName'\n\ 
     \ last_name: 'sn'\nEOS\n" 
    image: nginx 
version: '3.0' 
+0

を検証しません、それが機能していません。複数行の設定を追加した場合、エラー:yaml.scanner.ScannerError:「./docker-compose.yml」の行番号 に「 」という簡単なキーをスキャンしているときに ':' "./docker-compose.yml"、33行目、9桁 – burtsevyg

+0

32行には閉じるEOS – burtsevyg

+0

@burtsevygが含まれています。編集を確認してください。 –

関連する問題