Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve configuration - support environment variables #48

Draft
wants to merge 1 commit into
base: experiments/vegur
Choose a base branch
from

Conversation

phanimahesh
Copy link
Member

We would like releases to support:

  1. Reading configuration from system environment. Ideally only on docker builds.
  2. Using toml for configuring proxy42. (will be handled in a later PR)

Why TOML?

It is a much safer, leaner format compared to yaml, and is easier than json to work with (for humans).

Distillery recommends it. The entirety of rust ecosystem uses it. It is unambiguous, and will be easier for sysadms to work with, compared to erlang term format in sys.config.

The TOML configuration should be entirely optional - even an empty file should suffice.

Plan

  • Use Distillery configuration providers to generate sys.config in the configure phase of release startup, before starting the actual release.
  • Use Mix.Config provider: It is the easiest to start with.
    • Pick up environment variables where needed.
    • Ignore empty variables, fall back to defaults.
    • Limit environment expansions to docker builds only. (via MIX_ENV)
  • Write TOML transforms to convert datatypes where needed, and enable TOML for os packages
  • Operating system packages should have TOML as the default configuration format, without environment variable expansion. (Also needs package builds to be setup first)

@ghost ghost assigned phanimahesh May 14, 2019
@ghost ghost added the in progress label May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant