S
Supanote
Sign in Sign up

PostgreSQL with pgvector & Redis RAG Embedding Stack

plain (yaml) 13 hours ago · 34 lines · 6 views
1version: '3.8'
2
3services:
4 pgvector-db:
5 image: pgvector/pgvector:pg16
6 container_name: postgres-pgvector
7 restart: unless-stopped
8 environment:
9 POSTGRES_USER: ${DB_USER:-vector_user}
10 POSTGRES_PASSWORD: ${DB_PASSWORD:-change-me}
11 POSTGRES_DB: ${DB_NAME:-embeddings_store}
12 ports:
13 - "5432:5432"
14 volumes:
15 - pgvector_data:/var/lib/postgresql/data
16 - ./init-scripts:/docker-entrypoint-initdb.d
17 command: >
18 postgres
19 -c shared_preload_libraries=vector
20 -c max_connections=100
21 -c shared_buffers=1GB
22 -c work_mem=64MB
24 redis-cache:
25 image: redis:7-alpine
26 container_name: vector-cache
27 restart: unless-stopped
28 ports:
29 - "6379:6379"
30 command: ["redis-server", "--maxmemory", "512mb", "--maxmemory-policy", "allkeys-lru"]
32volumes:
33 pgvector_data:

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Share Note

Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification