Spaces:
Running
Running
| services: | |
| qdrant: | |
| image: qdrant/qdrant:latest | |
| ports: | |
| - "6333:6333" | |
| - "6334:6334" | |
| volumes: | |
| - qdrant_data:/qdrant/storage | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"] | |
| interval: 10s | |
| timeout: 3s | |
| retries: 5 | |
| ollama: | |
| image: ollama/ollama:latest | |
| ports: | |
| - "11434:11434" | |
| volumes: | |
| - ollama_data:/root/.ollama | |
| profiles: | |
| - local | |
| ollama-init: | |
| image: ollama/ollama:latest | |
| depends_on: | |
| - ollama | |
| entrypoint: > | |
| sh -c " | |
| until ollama list --host http://ollama:11434 > /dev/null 2>&1; do | |
| echo 'Waiting for Ollama to be ready...'; | |
| sleep 2; | |
| done; | |
| echo 'Pulling gemma3:4b...'; | |
| ollama pull gemma3:4b --host http://ollama:11434; | |
| echo 'Model ready.'; | |
| " | |
| profiles: | |
| - local | |
| api: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.compose | |
| ports: | |
| - "8000:8000" | |
| env_file: | |
| - .env | |
| environment: | |
| - QDRANT_URL=http://qdrant:6333 | |
| - OLLAMA_BASE_URL=http://ollama:11434 | |
| depends_on: | |
| qdrant: | |
| condition: service_healthy | |
| volumes: | |
| - ./docs:/app/docs | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:8000/health/ready"] | |
| interval: 30s | |
| timeout: 5s | |
| retries: 3 | |
| start_period: 60s | |
| ui: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.compose | |
| ports: | |
| - "8501:8501" | |
| env_file: | |
| - .env | |
| environment: | |
| - API_BASE_URL=http://api:8000 | |
| depends_on: | |
| api: | |
| condition: service_healthy | |
| entrypoint: [] | |
| command: ["streamlit", "run", "src/ui/app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |
| volumes: | |
| qdrant_data: | |
| ollama_data: | |