The stack uses Docker and Docker-compose to run 5 services:
API - Back-end container tp run the application endpoints and produce events and retrieve the read model.
Consumer app - Back-end container to run the consumer that will retrieve the produced event from the message broker (RabbitMQ)
Postgres - Relational Database system
ElasticSearch - Document oriented database system to store the events.
RabbitMQ - Message broker used to dispatch the different events for the dedicated consumers.
Adminer - Database management system with gui interface
Kibana - Visualization dashboard for Elasticsearch
- Move your terminal in the root directory of the project.
- Run
docker-compose up --build -d
The flag-d
stands for detached if you don't want to have all the docker logs. - Access to the api app through
http://localhost:8000
Note: If you already build the project once you don't need to add the
--build
flag. You will only need it some build changes are made
Disclaimer: sometime the ElasticSearch and RabbitMQ services starts after the api or the consumer app and causes crash
- For the api:
Change a file in the api app under /app
directory and the hotreload will do the rest
- For the consumer:
- log into your terminal at the root directory of the project
- Run
docker-compose exec app-consumer /bin/sh
, you should be in the container in the directoryconsumer
then runair -c .consumer.toml
Container | External Port | Internal Port |
---|---|---|
API | 8000 | 8000 |
Consumer | 8082 | 8082 |
Postgres | 5432 | 5432 |
ElasticSearch | 9200 | 9200 |
RabbitMQ | 5672 | 5672 |
RabbitMQ GUI | 15672 | 15672 |
Kibana | 5601 | 5601 |
Adminer | 8080 | 8080 |
For rabbitMQ login, ID: user, Password: bitnami