Skip to content

Commit

Permalink
Changed image to bitnami/pgbouncer
Browse files Browse the repository at this point in the history
  • Loading branch information
kisztof committed Aug 22, 2023
1 parent c2531b4 commit 73f6bb5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pgbouncer_postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
sudo apt-get install -y postgresql-client
docker-compose ps # Lists the status of all services
count=0
until PGPASSWORD=password psql -h pgbouncer -p 6432 -U pgbouncer -d pgbouncer -c 'SHOW STATS;' || [[ $count -eq 15 ]]; do
until PGPASSWORD=password psql -h localhost -p 6432 -U username -d postgres -c 'SHOW STATS;' || [[ $count -eq 15 ]]; do
sleep 2
count=$((count + 1))
done
Expand Down
13 changes: 12 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ services:
POSTGRES_PASSWORD: password

pgbouncer:
build: ./pgbouncer
image: bitnami/pgbouncer
environment:
POSTGRESQL_HOST: postgres
POSTGRESQL_USERNAME: username
POSTGRESQL_PASSWORD: password
POSTGRESQL_DATABASE: postgres
PGBOUNCER_POOL_MODE: transaction
PGBOUNCER_PORT: 6432
ports:
- "6432:6432"
depends_on:
- postgres
volumes:
- ./pgbouncer/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini
- ./pgbouncer/userlist.txt:/etc/pgbouncer/userlist.txt

4 changes: 0 additions & 4 deletions pgbouncer/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion pgbouncer/pgbouncer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* = host=postgres port=5432

[pgbouncer]
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
admin_users = username
2 changes: 1 addition & 1 deletion pgbouncer/userlist.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"username" "password"
"username" "5a231fcdb710d73268c4f44283487ba2"

0 comments on commit 73f6bb5

Please sign in to comment.