Dear Dancer users,
I want to run my Dancer2 application in a docker but I want to run
the docker without mounting any local directories and I want to run
the same container in all environments, not compile it separately
for different environments.
Problem:
How do I pass the environment dependent parts of the configuration
to the docker? I cannot use file `config_local.yaml` because then I
would need to copy that file somehow into the container when it
starts.
Possible solution:
I would pass parts of the configuration as environment variables,
e.g. DB_HOST and SITE_URL, and then apply these over
the values in config.yaml when I am creating the endpoints.
Suggestion:
Change the command `config` (or the underlying file reader
function) so that it can transpose environment variables into config
strings, e.g. plugins->database->connections->main->host
= '${DB_HOST}'.
--
Mikko Koivunalho
[ This message has been signed with PGP. Public key available at request. ]