Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

new docker compose features (profiles, extends) can replace your app-enable env vars #15

Open
beyondmeat opened this issue Dec 21, 2022 · 3 comments

Comments

@beyondmeat
Copy link

beyondmeat commented Dec 21, 2022

docker-compose.yml

  sabnzbd:
    extends:
      file: ./apps/docker-compose.sabnzbd.yml
      service: sabnzbd
    profiles:
      - sabnzbd
     networks: #override
      - wg-net

.env

COMPOSE_PROFILES=sabnzbd,radarr,radarr4k

compose v2

@Makeshift
Copy link
Owner

Beautiful. Thanks for letting me know, I'll have a look.

@Makeshift
Copy link
Owner

extends is a deprecated feature from compose v2, isn't it? I can't see anything to do with it being added to v3 - if it has been, could you link me to it?

profiles is a good shout though!

@beyondmeat
Copy link
Author

beyondmeat commented Jan 7, 2023

The versioning is confusing because they named the rewitten Go compose and called it V2, when it would have been better to call it V4.

You're thinking of the compose file spec V2, which is different than the compose binary version. They also depreacted compose format version when using docker compose V2. Their doc site still haven't been updated for compose v2 for some reason. They brought back extends, and also deprecated version

That example is how my docker-compose is made and works great with docker compose.

I filed an issue docker/docs#16463 (comment)

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

No branches or pull requests

2 participants