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

Herarchical structure #278

Open
mbaev opened this issue Sep 30, 2019 · 0 comments
Open

Herarchical structure #278

mbaev opened this issue Sep 30, 2019 · 0 comments

Comments

@mbaev
Copy link

mbaev commented Sep 30, 2019

I ❤️ Figaro!

I not found any proposals on this. Is it possible to introduce herarchical structure? Currently we in able to make linear list of settings/variables (excepting environments).

I think it will be helpful to be able to avoid repeating for some settings like:

database_host: localhost
database_name: postgrdb
database_user: postgrusr
database_pass: 111

# or

deploy_user: root
deploy_port: 2121
deploy_server: example.com
deploy_dir: /var/www/domain
deploy_branch: master

It might be look like this:

database:
  host: localhost
  name: postgrdb
  user: postgrusr
  pass: 111

# or

deploy:
  user: root
  port: 2121
  server: example.com
  dir: /var/www/domain
  branch: master

This is only for definition things. I think it's need to be merged into single string variables as well as previously: deploy_user (although it may be available and by the new way)

In this case the first level keywords like development, production or test can work as previously - to define environment.

production:
  database:
    user: prod_user
    pass: prod_pass

This feature will especially helpful for some developers who uses variables prefixed with an app name, like:

app_database_name: db_name
# ...etc.

Thank you! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant