Comment on I'm using compose wrong and I know it.
antsu@lemmy.wtf 1 year agoThis. And I recently found out you can also use includes
in compose v2.20+, so if your stack complexity demands it, you can have a small top-level docker-compose.yml with includes to smaller compose files, per service or any other criteria you want.
Lasso1971@thelemmy.club 1 year ago
I prefer compose merge because my “downstream” services can propagate their depends/networks to things that depend on them up the stream
There’s an env variables you set in .env so it’s similar to include
The one thing I prefer about include is that each include directory can have its own .env file, which merges with the first level .env. With merge it seems you’re stuck with one .env file for all in-file substitutes