-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 1008 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (31 loc) · 1008 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
services:
postgres:
image: postgres:18
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- "15432:5432"
volumes:
- ./tests/certs/server.crt:/tmp/certs/server.crt:ro
- ./tests/certs/server.key:/tmp/certs/server.key:ro
- ./tests/certs/ca.crt:/tmp/certs/ca.crt:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test"]
interval: 2s
timeout: 5s
retries: 10
command:
- bash
- -c
- |
cp /tmp/certs/server.crt /var/lib/postgresql/server.crt
cp /tmp/certs/server.key /var/lib/postgresql/server.key
chmod 600 /var/lib/postgresql/server.key
chown postgres:postgres /var/lib/postgresql/server.crt /var/lib/postgresql/server.key
exec docker-entrypoint.sh postgres \
-c ssl=on \
-c ssl_cert_file=/var/lib/postgresql/server.crt \
-c ssl_key_file=/var/lib/postgresql/server.key \
-c wal_level=logical