Marauder icon indicating copy to clipboard operation
Marauder copied to clipboard

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

Open beyondmeat opened this issue 3 years ago • 3 comments

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

beyondmeat avatar Dec 21 '22 18:12 beyondmeat

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

Makeshift avatar Jan 04 '23 11:01 Makeshift

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!

Makeshift avatar Jan 04 '23 11:01 Makeshift

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 https://github.com/docker/docs/issues/16463#issue-1524171215

beyondmeat avatar Jan 07 '23 21:01 beyondmeat