https://github.com/fanqingsong/docker-fastapi-celery-redis
https://github.com/fanqingsong/docker-fastapi-celery-redis
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fanqingsong/docker-fastapi-celery-redis
- Owner: fanqingsong
- Created: 2024-01-01T13:41:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-04T16:00:02.000Z (over 1 year ago)
- Last Synced: 2025-01-14T13:34:38.147Z (5 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker FastAPI Celery Redis
A basic [Docker Compose](https://docs.docker.com/compose/) template for orchestrating a [FastAPI](https://fastapi.tiangolo.com/) application & a [Celery](http://www.celeryproject.org/) queue with [Redis](https://redis.io/)
### Installation
```bash
git clone https://github.com/mattkohl/docker-fastapi-celery-redis
```### Build & Launch
```bash
docker-compose up -d --build
```This will expose the FastAPI's endpoints on port `5001` as well as a [Flower](https://github.com/mher/flower) server for monitoring workers on port `5555`
To add more workers:
```bash
docker-compose up -d --scale worker=5 --no-recreate
```To shut down:
```bash
docker-compose down
```To change the endpoints, update the code in [api/app.py](api/app.py)
Task changes should happen in [celery-queue/tasks.py](celery-queue/tasks.py)