-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.pg.yml
More file actions
56 lines (53 loc) · 1.15 KB
/
docker-compose.pg.yml
File metadata and controls
56 lines (53 loc) · 1.15 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
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: petacore-postgres
environment:
POSTGRES_DB: petacore
POSTGRES_USER: petacore
POSTGRES_PASSWORD: petacore
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
ports:
- "5432:5432"
networks:
- pg-network
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U petacore"]
interval: 10s
timeout: 5s
retries: 5
command:
- "postgres"
- "-c"
- "max_connections=200"
- "-c"
- "shared_buffers=256MB"
- "-c"
- "effective_cache_size=1GB"
- "-c"
- "maintenance_work_mem=64MB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "wal_buffers=16MB"
- "-c"
- "default_statistics_target=100"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "work_mem=2621kB"
- "-c"
- "min_wal_size=1GB"
- "-c"
- "max_wal_size=4GB"
networks:
pg-network:
driver: bridge
volumes:
postgres-data:
driver: local