Follow these steps to setup the project locally:
- Docker - Install Docker engine and docker-compose. See https://docs.docker.com/get-docker/
- Python - Install Python 3.10 or higher.
pip install poetryIn the repo root directory, install packages defined in pyproject.toml:
poetry installThis application utilizes Docker Compose to run the services in containers. The services include:
- FastAPI - The main FastAPI application that serves the API endpoints.
- Celery Worker - The Celery worker that executes async tasks queued from FastAPI.
- RabbitMQ - The message broker used to send tasks between FastAPI and Celery.
- Flower - A web UI for monitoring and administrating Celery clusters and workers.
To start all the services, run:
docker-compose upThis will start the FastAPI service on port 8080, Celery worker, RabbitMQ on the default ports, and Flower on port 5555.
- FastAPI - http://localhost:8080/wait
- RabbitMQ - http://localhost:15672
- Flower - http://localhost:5555
RabbitMQ and Flower provide admin UI's to monitor queues, workers, tasks, etc.
The FastAPI service runs the main application and API endpoints.