【问题标题】:Placeholders within UAA_CONFIG_YAML environment variableUAA_CONFIG_YAML 环境变量中的占位符
【发布时间】:2016-11-11 01:04:09
【问题描述】:

我正在尝试在清单的 UAA_CONFIG_YAML 部分中设置 SMTP 设置。

smtp: 
   host: ${vcap.services.smtpdev.credentials.hostname:localhost} 
   port: 2525 
   user: ${vcap.services.smtpdev.credentials.username:user} 
   password: ${vcap.services.smtpdev.credentials.password:password}

这不起作用,但正在使用默认的 localhost。如果我提供无效的占位符,则会引发错误。

【问题讨论】:

    标签: cloudfoundry-uaa pivotal-web-services


    【解决方案1】:
    The way I have done it, I have set the UAA_CONFIG_PATH environment variable which points to the location of the yaml file. 
    The settings are provided as follows:
    smtp:
      host: smtp.gmail.com
      port: <port_number>
      auth: true
      starttls.enable: false
      user: <username>
      password: <password>
    
    These values are getting picked up by uaa. 
    Please let me know if it was helpful.
    

    【讨论】:

    • 是的,但是源代码中存在凭据。它应该能够从环境中的服务绑定中获取凭据,但显然不能。
    猜你喜欢
    • 2018-08-14
    • 2020-10-16
    • 2013-09-07
    • 2017-11-30
    • 1970-01-01
    • 1970-01-01
    • 2014-12-09
    • 2020-12-14
    • 2015-11-26
    相关资源
    最近更新 更多