-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (36 loc) · 971 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
37 lines (36 loc) · 971 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
26
27
28
29
30
31
32
33
34
35
36
37
services:
postgres:
container_name: pg-rag-full-postgres
build:
context: .
dockerfile: Dockerfile
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql
# 核心初始化脚本 (init.sql) 已在 Dockerfile 中打包进镜像
# 如需添加业务脚本,请使用单文件挂载方式,示例:
# - ./my-business-init.sql:/docker-entrypoint-initdb.d/99-business-init.sql:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
command:
- postgres
- -c
- shared_preload_libraries=pg_search,pg_cron,pg_stat_statements,age
- -c
- search_path=ag_catalog,public
- -c
- max_connections=200
- -c
- shared_buffers=256MB
- -c
- work_mem=16MB
volumes:
pg_data: