parent
f270621ac7
commit
e159723dda
@ -0,0 +1,118 @@
|
||||
services:
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg16
|
||||
container_name: second-brain-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: second_brain
|
||||
POSTGRES_USER: brain
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-braindb2026}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
networks:
|
||||
- brain-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U brain -d second_brain"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: second-brain-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
- brain-net
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
rag-api:
|
||||
image: second-brain-rag-api:latest
|
||||
container_name: second-brain-rag-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-braindb2026}@postgres:5432/second_brain
|
||||
OLLAMA_URL: ${OLLAMA_URL:-http://192.168.1.217:11434}
|
||||
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-nomic-embed-text}
|
||||
CHAT_MODEL: ${CHAT_MODEL:-qwen3:8b}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
SEARCH_TOP_K: ${SEARCH_TOP_K:-10}
|
||||
SEARCH_THRESHOLD: ${SEARCH_THRESHOLD:-0.65}
|
||||
CORS_ORIGINS: ${CORS_ORIGINS:-*}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8001:8000"
|
||||
networks:
|
||||
- brain-net
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
ingestion-worker:
|
||||
image: second-brain-ingestion:latest
|
||||
container_name: second-brain-ingestion
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-braindb2026}@postgres:5432/second_brain
|
||||
OLLAMA_URL: ${OLLAMA_URL:-http://192.168.1.217:11434}
|
||||
VAULT_PATH: /vault
|
||||
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-nomic-embed-text}
|
||||
CHUNK_SIZE: ${CHUNK_SIZE:-700}
|
||||
CHUNK_OVERLAP: ${CHUNK_OVERLAP:-70}
|
||||
volumes:
|
||||
- ${VAULT_PATH:-/tmp/vault}:/vault:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
agents:
|
||||
image: second-brain-agents:latest
|
||||
container_name: second-brain-agents
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-braindb2026}@postgres:5432/second_brain
|
||||
OLLAMA_URL: ${OLLAMA_URL:-http://192.168.1.217:11434}
|
||||
VAULT_PATH: /vault
|
||||
CHAT_MODEL: ${CHAT_MODEL:-qwen3:8b}
|
||||
volumes:
|
||||
- ${VAULT_PATH:-/tmp/vault}:/vault:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
web-ui:
|
||||
image: second-brain-ui:latest
|
||||
container_name: second-brain-ui
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: ${PUBLIC_API_URL:-http://192.168.1.16:8001}
|
||||
depends_on:
|
||||
- rag-api
|
||||
ports:
|
||||
- "3001:3000"
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
brain-net:
|
||||
driver: bridge
|
||||
Loading…
Reference in new issue