compose icon indicating copy to clipboard operation
compose copied to clipboard

Introduction compose config --parameters feature

Open teror4uks opened this issue 3 years ago • 1 comments

Introduced the feature to print variables from config files with additional info like default value, required flag, actual value, source.

example usage:

❯ ./docker-compose config --parameters
NAME           DEFAULT    REQUIRED   ACTUAL      SOURCE
LOGGIN_LEVEL   log_info   false      log_info    /home/user/projects/compose/bin/docker-compose.yml
BAR                       true       BAR_VALUE   .env
BUZZ           buzz       false      buzz        /home/user/projects/compose/bin/docker-compose.yml
FOO                       false                  /home/user/projects/compose/bin/docker-compose.yml

Related issue feature proposal

Cute animal

image

teror4uks avatar Mar 13 '22 18:03 teror4uks

@ndeloof hey, could you please help with the review?

teror4uks avatar Mar 23 '22 08:03 teror4uks

unfortunately obsolete, especially with the introduction of multi-values for --env-file so we can't track the origin of a value by file anymore. Could probably at least claim source="from env file"

Also, not very pleasant we have to replicate the model parsing logic here with ParseYAML, ExtractVariables etc. I wish we could configure a listener on compose-go Load to get more visibility on how variables get used, so we can build this parameters report

ndeloof avatar Apr 28 '23 10:04 ndeloof