I dived a bit deeper into the mix release documentation, ConfigProvider specifically supports loading config files from multiple files (Config.Provider — Elixir v1.20.2), but as far as I can see that would require me to build different releases per app-env.
So that
releases: [
demo: [
config_providers: [
{Config.Reader, {:system, "RELEASE_ROOT", "/runtime_demo.exs"}}
]
],
staging: [
config_providers: [
{Config.Reader, {:system, "RELEASE_ROOT", "/runtime_staging.exs"}}
]
]
]
the correct runtime file would be included in the release. Currently I am building one Docker image for all app environments, which is very convenient. I guess I need to somehow put in some custom logic to only execute the relevant app-env-specific runtime file if possible.






















