-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (30 loc) · 1.24 KB
/
docker-compose.yml
File metadata and controls
31 lines (30 loc) · 1.24 KB
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
26
27
28
29
30
31
services:
db:
build:
context: .
args:
PG_MAJOR_VERSION: ${PG_MAJOR:-16} # Environment variable PG_MAJOR, defaults to 16
POSTGIS_MAJOR_VERSION: ${POSTGIS_MAJOR_VERSION:-3} # Environment variable POSTGIS_MAJOR_VERSION, defaults to 3
PGVECTOR_TAG: ${PGVECTOR_VERSION:-v0.8.0} # Environment variable PGVECTOR_VERSION, defaults to v0.8.0
environment:
# TypeORM test defaults, or override with your own .env file
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-test}
POSTGRES_USER: ${POSTGRES_USER:-test}
POSTGRES_DB: ${POSTGRES_DB:-test}
ADDITIONAL_DATABASES: ${ADDITIONAL_DATABASES:-}
# The following are set inside the Dockerfile from build ARGs for runtime access if needed:
# PG_MAJOR_VERSION, POSTGIS_MAJOR_VERSION, PGVECTOR_TAG
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-test}"]
interval: 10s
timeout: 5s
retries: 5
# Add the command to preload pgvector for optimal performance
# This ensures shared_preload_libraries includes 'vector'
command: postgres -c shared_preload_libraries=vector
volumes:
postgres_data: