What role to files other than 'config.yml'

2019-04-22 18:26发布

问题:

I understand that AWS Elastic Beanstalk only needs a single configuration file in the .elasticbeanstalk directory, but (1) when I run eb config I get an additional file, myenv.env.yml; and (2) my IDE threats additional files as important to push, by placing

!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml 

in my project's .gitignore.

What are these additional files and what role do they play? My understanding was that only config.yml mattered, and that only it had any effect.

回答1:

The myenv.env.yml file is intended to be a temporary file. eb config creates it, then you edit it, save it, and exit the editor. Once the editor is closed, the CLI updates the environment and the file gets deleted.

As for the second part of your questions, the sections in .gitignore are intended for those who want to check in their configurations. For example, lets say you have a config.yml file. But you want other developers on your team to use a standard version of the file. You can create (or rename your current file) a file called config.global.yml and it will work exactly like config.yml except it can be checked in to version control.

If you have a config.global.yml and a config.yml the config.yml will always take precedence over any overlapping settings.