Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit c1c1b6e

Browse files
zoom and enhance with pgbouncer
1 parent e9092b4 commit c1c1b6e

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

examples/docker-compose-postgres/docker-compose.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ services:
1111
- db-network
1212
environment:
1313
- SQLSTREAMSTORE_PROVIDER=postgres
14-
- SQLSTREAMSTORE_CONNECTION_STRING=Host=database;Port=5432;User Id=postgres;Database=example
14+
- SQLSTREAMSTORE_CONNECTION_STRING=Host=pgbouncer;Port=6432;User Id=postgres;Database=example;Pooling=false;
1515
depends_on:
16-
- database
16+
- pgbouncer
1717

1818
database:
1919
container_name: sss-example-postgres
@@ -23,6 +23,22 @@ services:
2323
networks:
2424
- db-network
2525

26+
pgbouncer:
27+
container_name: sss-example-pgbouncer
28+
image: brainsam/pgbouncer:1.7.2
29+
environment:
30+
DB_HOST: database
31+
DB_USER: postgres # define credentials
32+
DB_PORT: 5432 # define database
33+
links:
34+
- database
35+
ports:
36+
- "6432:6432" # PgBouncer port
37+
networks:
38+
- db-network
39+
depends_on:
40+
- database
41+
2642
networks:
2743
app-network:
2844
driver: bridge

0 commit comments

Comments
 (0)