We deploy our application to three different environments at the moment, each with a different database instance and set of credentials for accessing that instance.
I’ve updated the context.xml and the war-context.xml so that they are able to distinguish between localhost deployments and deployments in AWS, but am constantly running into errors with AWS deployments where createDb and updateDb tasks in the build.gradle file have the wrong credentials.
We’d like to be able to parameterize those variables (ex. connectionParams, dbms, dbName, dbUser) so that we don’t need to change them with each deploy.
Is there a Gradle or CUBA feature that supports this?
As a follow-up, is it necessary that we run the createDb and updateDb scripts each time the project is deployed? We make all of our database changes with Liquibase, so we don’t really need either of them to run on startup.
And, if not necessary, how do stop them from running? Will removing the tasks from the build.gradle be enough, or should we add it somewhere as a startup parameter?