Normally, the example you start with Docker introduce environment to right more or less one app - frontend, backend, something else..

Would you put all containers of a larger app (20-30 containers and above without replicas) still to the same stack or introduce a set of stacks representing system layers?


I would say It depend on you preference since redeploying a stack for only 1 or so image, will not restart all the containers present.

In the other hand network feature since docker 17.06 are reusable between stack with the attachable mode so you could easily separate the layers of your app while keeping them on the same sub-network (for usage like traefik or private data network).

Frankly for me this is the same problem as in dev when you separate the functions you are defining so it's easier for the others devs to understand a file of 50 lines compare to a file of 500 lines.

In the end it also depend on how this is integrated with your CD and if it's painful to update one document or multiple document when adding/removing services.

Personally I would go with multiples stack files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.