forked from juitnow/juit-pgproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (49 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (49 loc) · 1.2 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
version: '3.8'
services:
pgproxy:
build: .
ports:
- "8080:8080"
environment:
# PGProxy Server Configuration
PGPROXYSECRET: "your-super-secret-key-change-this"
PGPROXYADDRESS: "0.0.0.0"
PGPROXYPORT: "8080"
PGPROXYHEALTHCHECK: "/health"
# Connection Pool Configuration
PGPOOLMINSIZE: "2"
PGPOOLMAXSIZE: "20"
PGPOOLIDLECONN: "10"
PGPOOLACQUIRETIMEOUT: "30"
PGPOOLBORROWTIMEOUT: "120"
PGPOOLRETRYINTERVAL: "5"
# PostgreSQL Connection Configuration
PGHOST: "postgres"
PGPORT: "5432"
PGDATABASE: "postgres"
PGUSER: "postgres"
PGPASSWORD: "postgres"
depends_on:
- postgres
restart: unless-stopped
networks:
- pgproxy-network
# Optional: Include a PostgreSQL instance for testing
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- pgproxy-network
volumes:
postgres_data:
networks:
pgproxy-network:
driver: bridge