FastAPI + Celery + Redis + Postgres + MinIO (S3) + Telegram webhook.
- Clone and create
.envfrom.env.exampleand fill tokens. - Start services:
docker compose up -d- Create the S3 bucket:
bash scripts/create_buckets.sh- Expose the API (for Telegram webhook), e.g. using ngrok:
ngrok http 8000- Set Telegram webhook:
export $(cat .env | xargs)
bash scripts/set_webhook.sh- Send a photo to your bot. You should see:
- Upload to MinIO
- Celery task executing inference stub
- Score saved to Postgres
- Telegram message with points
GET http://localhost:8000/leaderboardshows team points
- For production, replace MinIO with AWS S3 (clear
S3_ENDPOINTand set AWS creds in environment). - Replace
worker/inference_stub.pywith your real model. - Add before/after logic and geofencing next.