- Create .env
cp .env.example .env
- Spin up the containers
docker-compose up -d --build
- Run database migrations
docker exec users-service poetry run alembic upgrade head
- Check the API docs on http://localhost:8001/docs
- Install dependencies with poetry
poetry install
- Run the basic test
poetry run make test
- If you want to run integration tests, you will need a postgres database up and running, follow the "How to run the application" section
- Run the full test suit
poetry run make test-integration
- Docs
http://wordbox-test-93fm5.ondigitalocean.app/docs
- Create user
curl --request POST \
--url https://wordbox-test-93fm5.ondigitalocean.app/users \
--header 'Content-Type: application/json' \
--data '{
"email": "whitman@email.com",
"name": "whitman",
"last_name": "bohorquez",
"phones": ["9876556432"]
}'
- Retrieve user
curl --request GET --url https://wordbox-test-93fm5.ondigitalocean.app/users/4c46288e-d09b-4e6f-95cf-baec94b5a9ae
I recycled code from an old project i created few months ago: https://github.com/elpapi42/reactive-microservices-with-kafka-python