local-ai-platform/compose.yaml
Brandon Wolfgang faf3d8ce1d feat: add PostgreSQL with pgvector infrastructure
- Add Docker Compose configuration for PostgreSQL 17 with pgvector
- Configure database credentials through a required POSTGRES_PASSWORD environment variable
- Bind the database port to localhost and persist data in a named volume
- Add a database health check using pg_isready
- Add the pg client and TypeScript definitions
2026-10-21 22:20:10 -05:00

19 lines
456 B
YAML

services:
db:
image: pgvector/pgvector:pg17
environment:
POSTGRES_DB: local_ai
POSTGRES_USER: app
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d local_ai"]
interval: 5s
timeout: 5s
retries: 10
volumes:
postgres_data: