Spaces:
Running
Running
File size: 1,438 Bytes
2043365 d3f36f7 2043365 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
version: '3.8'
services:
# Ollama service for local LLM inference
ollama:
image: ollama/ollama:latest
container_name: summarizer-ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# FastAPI backend service
api:
build: .
container_name: summarizer-api
ports:
- "8000:8000"
environment:
- OLLAMA_HOST=http://ollama:11434
- OLLAMA_MODEL=llama3.1:8b
- OLLAMA_TIMEOUT=60
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8000
- LOG_LEVEL=INFO
depends_on:
ollama:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Optional: Nginx reverse proxy for production
nginx:
image: nginx:alpine
container_name: summarizer-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
restart: unless-stopped
profiles:
- production
volumes:
ollama_data:
driver: local
networks:
default:
name: summarizer-network
|