Sample app, built to create an infrastructure envolving FastAPI and Celery
App built using Test Driven article as a reference
- Changes
.env.example
to.env
- Run and develop with docker-compose: docker compose up -d --built
- Access http://localhost:5557 to see the server and http://localhost:8010 to access flower
- Very powerful Task Message Management to work with async tasks in background, etc
- Init Celery worker:
celery -A main.celery worker --loglevel=info
- Use flower to monitor Celery tasks:
celery -A main.celery flower --port=5555
- Database migration management for SQLAlchemy
- Init Alembic:
alembic init alembic
- Migrate database:
alembic revision --autogenerate
- Updates the state of database based on application of all migrations:
alembic stamp head
- Updates new migrations:
alembic upgrade head