0
votes

We have a scenario where we have different app servers like Dev/QA/Stage/Prod and all have different configuration settings (Which normally every Org have) like hostname/portno/jndi etc

My questions are:

  1. What is the best way to deal with different environment server (Dev/QA/Stage/Prod) with different config settings.
  2. Where and how can we set these properties for the worklight project?
  3. Also can we set some configuration file in Worklight project with different environments so that it can change the hostname/port at run-time depending on the environment.

If any one have done this before, please guide on this and if feasible provide any sample file. If someone answer question no three (3), that will help me alot.

Thanks

1

1 Answers

2
votes

It is possible to manage different worklight environments using multiple copies of worklight.properties ( eg worklight.properties.STAGE etc) and changing the settings in there for the target environment. This way when you build for each environment the required settings are picked up.

If you do not want to build for each environment you can uninstall the worklight war file and reinstall it by setting jndi properties with required environment variables. This will create entries in the server.xml file that correspond to settings in worklight.properties

Also you can use <include optional=true>additionalServerConfig.xml</include> in the server.xml for was and store configurations for each environment in separate xml files for the given environment and import them using this include mechanism.

Here is a link to some slides I put together on setting some of these things up https://slides.com/donalspring