Update docker-compose.yml for PostgreSQL 18+ compatibility and clarify volume paths
This commit is contained in:
@@ -14,7 +14,8 @@ services:
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- rag_pgdata:/var/lib/postgresql/data
|
||||
# PG 18+: mount at /var/lib/postgresql (data goes in versioned subdir). For pg16 use /var/lib/postgresql/data.
|
||||
- rag_pgdata:/var/lib/postgresql
|
||||
# Init scripts run once on first start (create extension, tables). Optional: comment out to skip.
|
||||
- ./docker/postgres-init:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
@@ -39,13 +40,15 @@ services:
|
||||
- "${WEBHOOK_PORT:-8000}:8000"
|
||||
environment:
|
||||
RAG_DB_DSN: "postgresql://${POSTGRES_USER:-rag}:${POSTGRES_PASSWORD:-rag_secret}@postgres:5432/${POSTGRES_DB:-rag}"
|
||||
RAG_REPO_PATH: ${RAG_REPO_PATH:-/data}
|
||||
# In container repo is always at /data (mounted below). Use RAG_REPO_HOST in .env for host path.
|
||||
RAG_REPO_PATH: "/data"
|
||||
RAG_EMBEDDINGS_DIM: ${RAG_EMBEDDINGS_DIM:-1536}
|
||||
GIGACHAT_CREDENTIALS: ${GIGACHAT_CREDENTIALS:-}
|
||||
GIGACHAT_EMBEDDINGS_MODEL: ${GIGACHAT_EMBEDDINGS_MODEL:-Embeddings}
|
||||
WEBHOOK_SECRET: ${WEBHOOK_SECRET:-}
|
||||
volumes:
|
||||
- ${RAG_REPO_PATH:-./data}:/data
|
||||
# Host path: set RAG_REPO_HOST in .env (e.g. /Users/you/repo). Falls back to RAG_REPO_PATH then ./data.
|
||||
- ${RAG_REPO_HOST:-${RAG_REPO_PATH:-./data}}:/data
|
||||
entrypoint: ["rag-agent"]
|
||||
command: ["serve", "--host", "0.0.0.0", "--port", "8000"]
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user