This project allows to store the output of a command in a Mongo database throught execute it by a task background running in a RabbitMQ queue.
project/
app/
api/...
models/...
tests/
api/...
models/...
Dockerfile
requirements.txt
run.py
.env
docker-compose.yml
Makefile
To run this project need to have installed Docker and docker-compose. Then, add a file called as .env
. This file contains env vars for rabbit and mongo and looks like that:
MONGO_USER=<user>
MONGO_PASS=<pass>
RABBIT_USER=<user>
RABBIT_PASS=<pass>
RABBIT_VHOST=<host>
- Build and run project
docker-compose up --build
- Stops containers and removes containers
docker-compose down
- Run tests
docker-compose run web pytest
Also, you can use makefile commands:
- Build
make build
- Up
make up
- Run tests
make unit
To use this project, you can execute http calls using httpie client.