Using a JSON File to Override App Property Values
To override an app prop using a JSON file:
- Procedure
-
In the JSON file, make sure that the app property which you want to override is set as follows:
"<property>":"<value>"
For example:{
"IntegerOverrideVal":453,
"StringOverridingValue":"hello",
"BoolValue":true
}Note: Only for certificates, the format of the property must be:"<property>":"<encoded_value>"
To get the encoded value of the contents, you can use https://www.base64encode.org/ or any other base64 encoding tool. - Execute the binary of the app using the
FLOGO_APP_PROPS_JSON
environment variable as follows:FLOGO_APP_PROPS_JSON=/<filepath>/<JSON filename>.json ./<binary>
Example: Overriding a Certificate Using a JSON File
You can override a server key and certificate using an app property. You would, typically, need to override a certificate if the existing certificate has expired or you want to use a custom certificate. You can directly override the certificate at runtime instead of re-configuring the app. In such a case:
- Procedure
- In the JSON file, set the
ServerKey
andServerCertificate
app properties as follows: - Execute the binary of the app using the
FLOGO_APP_PROPS_JSON
environment variable as follows:FLOGO_APP_PROPS_JSON=/home/john/Downloads/appPropOverride.json ./RestSSLService-linux_amd64
{
"ServerKey":"LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2Z0l",
"ServerCertificate":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1J",
}