- Python
- FastAPI
- Postgres
- celery
- RabbitMQ
- Pytest
- Docker
- Sentry for monitoring the app
- Celery flower for monitoring the Celery tasks
- Alembic for Database Migrations
- pre-commit hooks
git clone git@github.com:MbxrAteeq/pika-test.gitCreate a .env file and set database url's
cp .env-sample .envBuild Docker Images
sudo docker-compose buildStart Docker Services
sudo docker-compose up -dRun alembic migrations
sudo docker-compose run app alembic upgrade headCreate and activate virtual environment:
cd pika-assignment
python3 -m venv env
source env/bin/activatecp .env-sample .envNote: set .env values according to your local configurations.
Note: If you are running the app with PostgreSQL, you will probably need to create the databases as well:
createdb --host=localhost -U postgres -O postgres -E utf8 -T template0 pika
createdb --host=localhost -U postgres -O postgres -E utf8 -T template0 pika_testbash ./setup.shbash run.shcelery -A celery_service.celery worker --loglevel=infocelery -A celery_service.celery flowerThe server will start listens on port 8000 on address http://127.0.1:8000. Find swagger docs at http://127.0.1:8000/docs/swagger. Find flower dashboard at http://127.0.1:5555.
To run test, run the following command
pytest -vv -s