An exapmple OTP application to make use of HOCON for configuration management
$ rebar3 release
$ ./_build/default/rel/example/bin/entrypoint.sh console
Erlang/OTP 23 [erts-11.1.8] [emqx] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1]
Eshell V11.1.8 (abort with ^G)
1> application:get_all_env(example).
[{listeners,#{<<"http">> => #{<<"port">> => 8080},
<<"https">> =>
#{<<"port">> => 8083,
<<"ssl">> =>
#{<<"cacertfile">> => "config/ssl/ca.pem",
<<"certfile">> => "config/ssl/server.pem",
<<"keyfile">> => "config/ssl/server.key"}}}}]
``
## Steps to create
* If not an existing project, create one with `rebar3 new umbrella <name>`
* Add HOCON config file `config/example.hocon`
* Add HOCON schema module `apps/example/src/example_schema.erl`
* Add an entrypoint script (which calls generated boot script) `bin/entrypoint.sh`
this script helps to generate sys.config and vm.args before calling the default
(generated by `rebar3 release` command) boot script.
* Include the config file and the entrypoint script in `rebar3.config`'s release overlays