Play can't read Heroku config vars when parsing application.conf

I am deploying an app written with Play! Framework 1.2.3 to heroku (cedar stack) and I am setting some environment variables via heroku config:add DB_NAME="FOO" These are set OK (seen via heroku config --app appname). These are read from the code both via manual calls to System.getenv() and substitutions done by play when reading application.conf via the morphia.db.name=${DB_NAME} mechanism. This tactic works well locally, but on heroku the environment variables are seemingly not read and the push to heroku fails since it can't substitute the variables. Warning emitted by play is: WARNING: Cannot replace DB_NAME in configuration (morphia.db.name=${DB_NAME}) And it dies because it can't connect to the database, which is a fatal error. It also reports in the error as trying to connect to ${HOST}:${PORT}, so no substitution is performed here. Am I missing something here, or is this simply not working for Play! apps on heroku at present? How should this be done?

以上就是Play can't read Heroku config vars when parsing application.conf的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏