The idea is to illustrate the power of containers in the context of CSPA services.
A RabbitMQ broker, providing a communication for the services.
A collection service, providing the questionnnaire.
A process service, that implements the validation logic.
An analyse service, aggregating data and pushing it to the disseminate service.
The disseminate service is displaying the final product. It exists in two version.
All in one
docker-compose -f docker-compose.yml up -d
docker-compose stop
docker stop $(docker ps -a -q)
docker-compose -f docker-compose-new.yml up -dStarting the first system:
docker-compose -f docker-compose.yml up -dStopping:
docker-compose stopThen, check if all containers are stopped and if not act:
docker ps
docker stop $(docker ps -a -q)Starting the second system:
docker-compose -f docker-compose-new.yml up -dTo start the main system, via the docker-compose.yml:
docker-compose upTo rebuild images using compose:
docker-compose buildOr in one go:
docker-compose build && docker-compose upService are reachable on the docker compose network by their compose id.
For example, the broker is declare as:
services:
broker:in the compose file, and so is reached via the Python API like:
connection = pika.BlockingConnection(pika.ConnectionParameters(host="broker"))