-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
25 lines (24 loc) · 810 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
25 lines (24 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Postgres with the pgvector extension preinstalled. The plain `postgres`
# image will not work — src/db.js runs CREATE EXTENSION vector on startup.
services:
postgres:
image: pgvector/pgvector:pg17
container_name: rag-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
# The app calls initDb() immediately on boot, so waiting for the port to
# open is not enough — pg_isready confirms the server accepts queries.
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: