new docker compose features (profiles, extends) can replace your app-enable env vars
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
Beautiful. Thanks for letting me know, I'll have a look.
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!
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