You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.2 KiB
123 lines
3.2 KiB
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
|
|
pull_policy: never
|
|
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.5:2b}
|
|
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
|
|
pull_policy: never
|
|
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:
|
|
- /mnt/2brain:/vault
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- brain-net
|
|
|
|
agents:
|
|
image: second-brain-agents:latest
|
|
pull_policy: never
|
|
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.5:2b}
|
|
volumes:
|
|
- /mnt/2brain:/vault
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- brain-net
|
|
|
|
web-ui:
|
|
image: second-brain-ui:latest
|
|
pull_policy: never
|
|
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:
|
|
- "3002:3000"
|
|
networks:
|
|
- brain-net
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
brain-net:
|
|
driver: bridge
|