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

Shared Extension Fields between include files #323

Open
GuyKh opened this issue Jan 25, 2024 · 1 comment
Open

Shared Extension Fields between include files #323

GuyKh opened this issue Jan 25, 2024 · 1 comment

Comments

@GuyKh
Copy link

GuyKh commented Jan 25, 2024

Hey,

Looking at this structure - there's a "main" docker-compose file which includes small, "by-service" compose files (in compose folder).

However, despite I see the use of Extension Fields (i.e. <<: *common-keys-core in archive folder files) - I don't see it's being used as part of this divide strategy.
Is this possible?

E.g.

docker-compose-ws.yml:

...
# Keys common to some of the core services that we always to automatically restart on failure
x-common-keys-core: &common-keys-core
  networks:
    - npm_proxy
  security_opt:
    - no-new-privileges:true
  restart: always
...

include:
...
  - compose/$HOSTNAME/portainer.yml
...

portainer.yml:

services:
  # Portainer - WebUI for Containers
  portainer:
    container_name: portainer
    <<: *common-keys-core
    ...
@GuyKh
Copy link
Author

GuyKh commented Jan 25, 2024

Well -- looking here - it seems that it's impossible

If you think of a workaround, please let me know

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