[ https://issues.apache.org/jira/browse/UNOMI-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713193#comment-16713193 ]
Michael Ghen commented on UNOMI-216: ------------------------------------ I liked the way the Airflow project handled the environment variables substitution into configuration files, followed a really nice naming convention, made getting airflow into docker very easy: [https://airflow.readthedocs.io/en/stable/howto/set-config.html] Basically: `FILENAME__SECTION__CONF_VAR_NAME` for example: `AIRFLOW__CORE__SQL_ALCHEMY_CONN` Since there seems to be a lot of config files here with lots of option, this might be a good convention too > Configure Unomi by editing one configuration file & read env variables for > Docker compatibility > ----------------------------------------------------------------------------------------------- > > Key: UNOMI-216 > URL: https://issues.apache.org/jira/browse/UNOMI-216 > Project: Apache Unomi > Issue Type: Improvement > Components: core > Affects Versions: 1.0.0-incubating, 1.1.0-incubating, 1.2.0-incubating, > 1.3.0-incubating, 1.4.0-incubating > Reporter: Serge Huber > Assignee: Serge Huber > Priority: Major > Fix For: 1.4.0-incubating > > > The idea here is to make it easy to "override" common configuration > properties in Apache Unomi by modifying a single configuration file. Of > course this type of deployment is focused on "static" deployments, not > deployment where the configuration admin is used to dynamically update > configuration. Also this will address the need of Docker containers that pass > configuration through environment variables. > As a consequence, default Unomi properties should be "placeholdered", with > default values > Here is the section in the Karaf documentation about configuration, including > environment variables references : > [http://karaf.apache.org/manual/latest/#_configuration_3] > "Properties can be referenced inside configuration files using the syntax > {{$\{<name>}}}. Default and alternate values can be specified using > {{$\{<name>:-<default_value>}}} and {{$\{<name>:+<alternate_value>}}} > syntaxes respectively." > "Environment variables can be referenced inside configuration files using the > syntax {{$\{env:<name>}}} (e.g.{{property=$\{env:FOO}}} will set "property" > to the value of the enviroment variable "FOO"). Default and alternate values > can be defined for them as well using the same syntax as above." > Some difficulty might come from configuration files such as the Hazelcast XML > configuration file that can only reference system properties, so we might > have to setup the placeholders in the custom.system.properties file. > This story includes modifications to the documentation to use this > centralized file, both on the Unomi website. > Migration will be handle through documentation as well, indicating where the > properties must be moved. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)