Deployment with configuration out of war

Hi,

One of our customers wants to have an automated deployment (their security department is forcing this requirement by the way) were a single WAR file is provided to the release manager containing the code (valid for all the environments) and then a configuration file with the properties for each environment out of the war and managed and accesible only per each environment

Is that feasible in the current CUBA application?

As far as we know the only way we have now is to generate a different war file with the properties inside per each environment.

They don’t want this as they need to manage different war versions.

Thanks in advance!

Regards,
Vicente

Hi,

the only way we have now is to generate a different war file with the properties inside per each environment.

That’s not true.
You can specify environment-specific properties in local.app.properties files.
Note that if you are using single WAR then location of these files is determined in the single-war-web.xml, in the appPropertiesConfig context parameter. There can be two files: one for web module and one for core module.

read more here:
https://doc.cuba-platform.com/manual-7.0/app_properties_files.html
https://doc.cuba-platform.com/manual-7.0/tomcat_in_prod.html

1 Like

Thanks @AlexBudarov!

We’ll give a try and let you know

Regards,
Vicente

Hi,

I recently created a example with a war file generation and external configuration files (context.xml & local.app.properties). You can find it here: GitHub - mariodavid/cuba-example-multiple-db-support: CUBA example that shows how to switch DBMS systems without changing the war file

Bye
Mario

thanks @mario

we were able yesterady to activate and test this configuration after following a similar steps coming from this forum:

Just posting this in case the community may find this useful as well.

We’ll review carefully your post as well. Thanks both!

Regards,
Vicente