Heroku - Unable to setup postgres database through Play Framework app?

后端 未结 2 553
庸人自扰
庸人自扰 2021-01-18 18:48

I am trying to setup postgres database on heroku through play framework app but i am keep getting an error regarding my DATABASE_URL.

Stack trace: -

         


        
2条回答
  •  感情败类
    2021-01-18 19:24

    It seems you are mixing some Play 1 and Play 2 conventions. It appears you are using Play 2. In Play 2 the easiest way to set this up is to not use DATABASE_URL in your application.conf and instead just override the database config in your Procfile:

    web: target/start -Dhttp.port=$PORT -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=$DATABASE_URL
    

    For a more detailed walk-through see my Play 2 Tutorial.

提交回复
热议问题