I'm defining the (small number of) services in a compose file and repeat it, but if I got to 100 services, I would probably look at kapitan to avoid the repetition. Getting started with kapitan can be confusing, but here are my notes to getting started with it. Combined with jsonnet I find it facilitates the maintenance of the config. I've just converted an existing (simple) swarm configuration to kapitan and am happy with it and the possibilities it opens.