-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
62 lines (62 loc) · 1.5 KB
/
docker-compose.yaml
File metadata and controls
62 lines (62 loc) · 1.5 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
services:
postgres:
image: cgr.dev/chainguard/postgres:latest
container_name: postgres
user: "70:70"
runtime: "runsc"
restart: unless-stopped
environment:
POSTGRES_USER: {POSTGRES_USER}
POSTGRES_PASSWORD: {POSTGRES_PASSWORD}
POSTGRES_DB: test_db
networks:
- pgnet
dns:
- 9.9.9.9
#ports:
# - "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./certificates/server.crt:/var/lib/postgresql/server.crt:ro
- ./certificates/server.key:/var/lib/postgresql/server.key:ro
command:
[
"-c", "ssl=on",
"-c", "ssl_cert_file=/var/lib/postgresql/server.crt",
"-c", "ssl_key_file=/var/lib/postgresql/server.key"
]
pgproxy:
image: rafaelribeiro96/pgproxy:1.82.5
command:
[
"--hostname", "pgproxy-node",
"--upstream-addr", "postgres:5432",
"--port", "5432",
"--upstream-ca-file", "/certificates/ca.pem",
"--state-dir", "/var/lib/pgproxy",
]
container_name: pgproxy
runtime: "runsc"
restart: unless-stopped
environment:
PGHOST: postgres
PGPORT: "5432"
PGUSER: {POSTGRES_USER}
PGPASSWORD: {POSTGRES_PASSWORD}
TSKEY: {TSKEY_API}
ports:
- "5432:5432"
networks:
- pgnet
dns:
- 9.9.9.9
links:
- postgres
volumes:
- ./certificates/ca.pem:/certificates/ca.pem:ro
- ./pgproxy-state:/var/lib/pgproxy
networks:
pgnet:
driver: bridge
volumes:
pgdata: {}