-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfra-pgbouncer.yml
50 lines (49 loc) · 1.15 KB
/
infra-pgbouncer.yml
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
version: "3"
services:
postgres:
image: postgres
logging:
driver: local
networks:
- postgres
ports:
- 5432:5432
volumes:
- postgres-volume:/var/postgresql_data
environment:
- PGDATA=/var/postgresql_data
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_DB=test
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U test" ]
interval: 10s
timeout: 5s
retries: 5
pgbouncer:
image: bitnami/pgbouncer:latest
logging:
driver: local
ports:
- 6432:6432
environment:
- POSTGRESQL_USERNAME=test
- POSTGRESQL_PASSWORD=test
- POSTGRESQL_DATABASE=test
- POSTGRESQL_HOST=postgres
- POSTGRESQL_PORT=5432
- PGBOUNCER_DATABASE=test
- PGBOUNCER_AUTH_TYPE=trust
- PGBOUNCER_POOL_MODE=transaction
- PGBOUNCER_IGNORE_STARTUP_PARAMETERS=extra_float_digits
networks:
- postgres
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-volume:
networks:
postgres:
external: false