Currently properties such as ds.serverName and ds.port must be defined in the properties file that is passed as system property basil.configurationFile. If these properties are passed on startup, the application does not seem to pick them up, see server initialization:
https://github.com/the-open-university/basil/blob/f6ab23a1cf322fd8aec7e38ee271048ecfbf1986/server/src/main/java/uk/ac/open/kmi/basil/server/BasilServerEnvironment.java#L15
In some instances, such as containerized environments like DC/OS, providing configuration files dynamically is not always handy. In such cases, setting environment variables is a preferable way. For example, if I set env variables DB_HOST and DB_PORT, then I could execute BASIl like this:
java -jar -Dbasil.configurationFile=basil.ini -Dds.serverName=${DB_HOST} -Dds.port=${DB_PORT} basil-server.jar -p 8080
where the ds.serverName and ds.port values would override those in basil.ini, if at all present.
It would be nice to have such support.
Currently properties such as
ds.serverNameandds.portmust be defined in the properties file that is passed as system propertybasil.configurationFile. If these properties are passed on startup, the application does not seem to pick them up, see server initialization:https://github.com/the-open-university/basil/blob/f6ab23a1cf322fd8aec7e38ee271048ecfbf1986/server/src/main/java/uk/ac/open/kmi/basil/server/BasilServerEnvironment.java#L15
In some instances, such as containerized environments like DC/OS, providing configuration files dynamically is not always handy. In such cases, setting environment variables is a preferable way. For example, if I set env variables
DB_HOSTandDB_PORT, then I could execute BASIl like this:where the
ds.serverNameandds.portvalues would override those inbasil.ini, if at all present.It would be nice to have such support.