Is there any way to use environment variables in the play! application.conf file? Something like this:
%prod.db.url=${env.DATABASE_JDBC_URL}
%prod.db.driver=org.postgresql.Driver
%prod.jpa.ddl=validate
I don't want to hardcode the URL in my application.conf because it contains credentials that the developer should not have access to.
All variables within ${} are resolved using the following sources:
So you could add these as -Dkey=name parameters when launching Play! with your secret credentials specific to your environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With