-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.51 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3.8'
services:
postgres:
image: pgvector/pgvector:pg16
container_name: file_search_db
environment:
POSTGRES_USER: file_search_user
POSTGRES_PASSWORD: file_search_password
POSTGRES_DB: file_search_db
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/setup_db.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U file_search_user -d file_search_db"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
command: >
postgres
-c shared_preload_libraries=vector
-c max_connections=100
-c shared_buffers=256MB
-c effective_cache_size=1GB
-c maintenance_work_mem=128MB
-c random_page_cost=1.1
-c effective_io_concurrency=200
-c max_wal_size=1GB
-c min_wal_size=80MB
# Optional: pgAdmin for database management
pgadmin:
image: dpage/pgadmin4:latest
container_name: file_search_pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
ports:
- "5050:80"
depends_on:
postgres:
condition: service_healthy
profiles:
- debug
restart: unless-stopped
volumes:
postgres_data:
driver: local
networks:
default:
name: file_search_network
driver: bridge