-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 1.53 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
61
62
63
64
services:
app:
build:
context: ./app
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://postgres:postgres@db:5432/copilot_insights
NEXT_TELEMETRY_DISABLED: "1"
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
networks:
- appnet
db:
image: postgres:18
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: copilot_insights
# Durability off for dev/test speed; tuned for ETL bulk-import from GitHub API
command: >
postgres
-c fsync=off
-c synchronous_commit=off
-c full_page_writes=off
-c shared_buffers=256MB
-c work_mem=16MB
-c maintenance_work_mem=64MB
-c effective_cache_size=512MB
-c max_connections=50
-c wal_level=minimal
-c max_wal_senders=0
-c archive_mode=off
-c max_wal_size=512MB
-c checkpoint_timeout=15min
-c checkpoint_completion_target=0.9
-c default_statistics_target=200
-c log_min_duration_statement=1000
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d copilot_insights"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
shm_size: 512m
networks:
- appnet
networks:
appnet:
driver: bridge
volumes:
pgdata: