parent
626b04aa4e
commit
bf5fcbdca9
@ -0,0 +1,9 @@
|
||||
POSTGRES_PASSWORD=braindb2026
|
||||
EMBEDDING_MODEL=nomic-embed-text
|
||||
CHAT_MODEL=qwen3:8b
|
||||
LOG_LEVEL=INFO
|
||||
SEARCH_TOP_K=10
|
||||
SEARCH_THRESHOLD=0.65
|
||||
CORS_ORIGINS=http://localhost:3000,http://192.168.1.16:3001
|
||||
CHUNK_SIZE=700
|
||||
CHUNK_OVERLAP=70
|
||||
@ -0,0 +1,149 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# PostgreSQL with pgvector
|
||||
# ---------------------------------------------------------------------------
|
||||
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:-brain}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./schema.sql:/docker-entrypoint-initdb.d/01_schema.sql:ro
|
||||
ports:
|
||||
- "5433:5432"
|
||||
networks:
|
||||
- brain-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U brain -d second_brain"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Redis (job queue)
|
||||
# ---------------------------------------------------------------------------
|
||||
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 (FastAPI)
|
||||
# ---------------------------------------------------------------------------
|
||||
rag-api:
|
||||
build:
|
||||
context: https://gitea.coer.nl/killercow/second-brain.git#main:services/rag-api
|
||||
dockerfile: Dockerfile
|
||||
container_name: second-brain-rag-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-brain}@postgres:5432/second_brain
|
||||
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:-http://localhost:3000,http://192.168.1.16:3001}
|
||||
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
|
||||
# ---------------------------------------------------------------------------
|
||||
ingestion-worker:
|
||||
build:
|
||||
context: https://gitea.coer.nl/killercow/second-brain.git#main:services/ingestion-worker
|
||||
dockerfile: Dockerfile
|
||||
container_name: second-brain-ingestion
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-brain}@postgres:5432/second_brain
|
||||
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_data:/vault
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# AI Agents
|
||||
# ---------------------------------------------------------------------------
|
||||
agents:
|
||||
build:
|
||||
context: https://gitea.coer.nl/killercow/second-brain.git#main:services/agents
|
||||
dockerfile: Dockerfile
|
||||
container_name: second-brain-agents
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://brain:${POSTGRES_PASSWORD:-brain}@postgres:5432/second_brain
|
||||
OLLAMA_URL: http://192.168.1.217:11434
|
||||
VAULT_PATH: /vault
|
||||
CHAT_MODEL: ${CHAT_MODEL:-qwen3:8b}
|
||||
volumes:
|
||||
- vault_data:/vault
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Web UI (Next.js)
|
||||
# ---------------------------------------------------------------------------
|
||||
web-ui:
|
||||
build:
|
||||
context: https://gitea.coer.nl/killercow/second-brain.git#main:services/web-ui
|
||||
dockerfile: Dockerfile
|
||||
container_name: second-brain-ui
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://192.168.1.16:8001
|
||||
depends_on:
|
||||
- rag-api
|
||||
ports:
|
||||
- "3001:3000"
|
||||
networks:
|
||||
- brain-net
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
vault_data:
|
||||
|
||||
networks:
|
||||
brain-net:
|
||||
driver: bridge
|
||||
Loading…
Reference in new issue