Ezka77 / xen-orchestra-ce

:whale: Docker & docker-compose files to deploy Xen Orchestra Community Edition (ie: from sources)
GNU General Public License v3.0
98 stars 35 forks source link

Why use `<< *logging` instead of `: *logging`? #29

Closed retnikt closed 4 years ago

retnikt commented 4 years ago

Random question, but in docker-compose.yml, you use

logging:
    <<: *logging

when

logging: *logging

could be used instead for the same outcome, which is simpler (IMO) to understand. Is there any reason for this?

Ezka77 commented 4 years ago

Yep same outcome, it is a YAML Merge type, it allows to add specific redis logging configuration below but, as here, there isn't any configuration you can use YAML Anchors.

Anyway YAML Anchors or Merge, this file is a template, I think the Merge gives you the flexibility to customize this part easily and I've keep it from an old configuration. At least I should rename this reference which is more confusing than using <<: or not ;-)

retnikt commented 4 years ago

Ah, I see. TIL