Research Docker stacks for summarization of containers #635

Closed
opened 2026-04-29 07:01:05 +00:00 by a24timsv · 3 comments
Collaborator

Currently all containers are started in a single compose/stack. This unnecessarily complicates building and maintaining containers. Research how we can create smaller components of containers to make developing easier.

Read about docker compose and docker stacks.

Some stacks might be able to function separately from everything else, but some containers need a common container to communicate (how all sensors communicate with the middleware through MQTT). Each stack CANNOT create its own middleware or MQTT, but needs to use the same.

For sensors, the generate, reader, Postgres and service, could all be a part of the same stack.

Post findings here.

Currently all containers are started in a single compose/stack. This unnecessarily complicates building and maintaining containers. Research how we can create smaller components of containers to make developing easier. Read about docker compose and docker stacks. Some stacks might be able to function separately from everything else, but some containers need a common container to communicate (how all sensors communicate with the middleware through MQTT). Each stack CANNOT create its own middleware or MQTT, but needs to use the same. For sensors, the generate, reader, Postgres and service, could all be a part of the same stack. Post findings here.
Owner

This is a central problem for all micro-service architectures... hopefully there is a suggestion/framework for resolving this. There may even be research papers on this topic.

This is a central problem for all micro-service architectures... hopefully there is a suggestion/framework for resolving this. There may even be research papers on this topic.
Collaborator

Research

Paper: https://arxiv.org/abs/2305.11293 analyzed 200+ open-source projects and identified common patterns for how containers are grouped in compose files. The paper touches on the problems mentioned in this issue, more specifically how services interact through shared networks, how compose files can be split across a repository, and how shared services like middleware can be accessed by multiple stacks.

Docker Compose vs Docker Stacks

Docker Compose and Docker Stacks both use the same compose file format but are meant for different things. Docker Compose is for local development on a single machine. Docker Stacks is part of Docker Swarm and is meant for production deployments across multiple machines. For our project Docker Compose is the better fit.

How to split with Docker Compose

Docker Compose supports splitting services across multiple files using external networks. One file creates a shared network, others join it with external: true. Services across files can communicate by service name as long as they share the same network. This is how shared services like middleware and MQTT can stay accessible to all stacks without each stack creating its own.

No new dependencies or tools needed.

### Research Paper: https://arxiv.org/abs/2305.11293 analyzed 200+ open-source projects and identified common patterns for how containers are grouped in compose files. The paper touches on the problems mentioned in this issue, more specifically how services interact through shared networks, how compose files can be split across a repository, and how shared services like middleware can be accessed by multiple stacks. **Docker Compose vs Docker Stacks** Docker Compose and Docker Stacks both use the same compose file format but are meant for different things. Docker Compose is for local development on a single machine. Docker Stacks is part of Docker Swarm and is meant for production deployments across multiple machines. For our project Docker Compose is the better fit. **How to split with Docker Compose** Docker Compose supports splitting services across multiple files using external networks. One file creates a shared network, others join it with external: true. Services across files can communicate by service name as long as they share the same network. This is how shared services like middleware and MQTT can stay accessible to all stacks without each stack creating its own. No new dependencies or tools needed.
Collaborator

This has been implemented. #985. I close this issue

This has been implemented. https://git.webug.se/Andras/BoundlessFlowCampus2K/pulls/985. I close this issue
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#635
No description provided.