gunicorn/examples/embedding_service/docker-compose.yml
Benoit Chesneau 0e05c824e9 feat(examples): add FastAPI embedding service with Docker testing
Add a complete example demonstrating dirty workers with sentence-transformers
for text embeddings via FastAPI:

- EmbeddingApp DirtyApp that loads and manages the ML model
- FastAPI endpoints for /embed and /health
- Docker and docker-compose configuration
- Integration tests with numpy similarity checks
- GitHub Actions CI workflow
2026-01-25 10:23:25 +01:00

14 lines
396 B
YAML

services:
embedding-service:
build:
context: ../..
dockerfile: examples/embedding_service/Dockerfile
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5)"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s # Model loading time