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 -d
Starting the first system:
docker-compose -f docker-compose.yml up -d
Stopping:
docker-compose stop
Then, 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 -d
To start the main system, via the docker-compose.yml:
docker-compose up
To rebuild images using compose:
docker-compose build
Or in one go:
docker-compose build && docker-compose up
Service 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"))