This allows to store sensitive configs (namely the secret key base and the database password) in a file (e.g. via Docker secrets).
The database can now be configured via DATABASE_USER, DATABASE_PASSWORD/DATABASE_PASSWORD_FILE, DATABASE_HOST and DATABASE variable as an alternative to the DATABASE_URL variable (which still has priority).
Description
This allows to store sensitive configs (namely the secret key base and the database password) in a file (e.g. via Docker secrets).
The database can now be configured via DATABASE_USER, DATABASE_PASSWORD/DATABASE_PASSWORD_FILE, DATABASE_HOST and DATABASE variable as an alternative to the DATABASE_URL variable (which still has priority).
The database password is encoded to prevent errors, like https://elixirforum.com/t/problems-with-url-in-a-configuration-for-ecto/4057.
Since I'm not very familiar with Elixir this might require some tweaking. However, it's working for me.
Issue
None
Screenshots
Not relevant
Checklist
mix test
mix format