Customer and Address API
RabbitMQ, celery and Kombu was used to exchange messages between each app/service
Following the diagram below, celery keeps consumer up to listen if has a new message to given a queue.
For the producer part it also was used kombu to send a message to given a queue.
Following these instructions will make this project running in your local machine development.
The entire customer app needs from other project to be up as well which is: address-api
- Python3
- Docker
- docker-compose
- Postgres [psycopg](http://initd.org/psycopg/docs/install.html)
1- git clone https://github.com/drsantos20/customer-service.git
2- cd customer-service
3- docker-compose up --build
4- cd ..
5- git clone https://github.com/drsantos20/address-service.git
5.1 Add your google maps API key into /address-service/api/settings.py -> `GOOGLE_API_KEY`
6- cd address-service
7- docker-compose up --build
1- Customer
1- git clone https://github.com/drsantos20/customer-service.git
2- cd customer-service
3- python3 -m venv env
4- source env/bin/activate
5- docker-compose up --build
2- Address
1- git clone https://github.com/drsantos20/address-service.git
2- cd address-service
3- python3 -m venv env
4- source env/bin/activate
5- docker-compose up --build
Make ensure if rabbitmq and postgres images is running.
to check docker ps
python manage.py test
POST http://127.0.0.1:8000/api/v1/order/
POST http://127.0.0.1:8000/api/v1/order/
{
"address": {
"street": "Praca da sé, 888",
"city": "Sao Paulo",
"uf": "SP",
"neighborhood": "Praça da sé",
"zip_code": "05424-000"
},
"user": {
"email": "[email protected]",
"name": "John",
"phone": 999999999
}
}
- Daniel Santos - Trying to keep simple and clean - drsantos20