Clicking on Heroku initiates the precompilation of your Play application, which in turn reads your application.conf file. Unfortunately, Heroku configuration variables are not available at build time, so you will see these warnings that you mentioned:
WARNING: Cannot replace VALUE in configuration (key=${VALUE})
However, this should not cause a failure. It should also not cause your application to not start. At run time, Play reads application.conf again and configuration variables will be present and their values ββwill be replaced.
It is hard to say exactly what is wrong in this case. One thing you can try is to run the Play commands just like Heroku does, and see what you get:
$ play precompile $ play run --http.port=5000 --%prod -Dprecompiled=true
Note that the separate pre-compilation step and the prod database identifier are different if you simply run the application locally as follows:
$ play run
You can also register a ticket with Heroku, and someone can take a look at your application.
At the very least, we need to get rid of these WARNING messages, because you are not the first to notice this.
source share