rag-system / docker-compose.yml
Joshua Sears
Fix HF Spaces: run Streamlit on port 7860
0390acb
Raw
History Blame Contribute Delete
1.02 kB
version: "3.9"
services:
rag-api:
build: .
command: ["python", "main.py", "serve", "--host", "0.0.0.0", "--port", "8000"]
ports:
- "8000:8000"
volumes:
- ./data:/app/data # persist ChromaDB + knowledge graph
env_file:
- .env
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
depends_on:
- ollama
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_models:/root/.ollama
restart: unless-stopped
# To pull a model on first run:
# docker exec <container> ollama pull llama3.2
# Optional: Prometheus metrics scraping
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
profiles:
- monitoring # only start with: docker-compose --profile monitoring up
volumes:
ollama_models: