Clean up document and make config more generic

This commit is contained in:
Dan Milne
2025-02-19 19:12:44 +11:00
parent 5dd89d3621
commit ce9b79f612
3 changed files with 17 additions and 5 deletions

View File

@@ -1,5 +1,9 @@
# Multi Database PostgreSQL with PGBouncer
This Compose project will let you run multiple database within one PostgreSQL container. It's based on (Cristian Angulo)[https://dev.to/nietzscheson/multiples-postgres-databases-in-one-service-with-docker-compose-4fdf]'s post on the subject.
It also starts up a PGBouncer.
## ENV file
Create a .env file with the following keys:
@@ -26,3 +30,12 @@ Alternatively, bind mount a local directory for PostgreSQL to use.
## Logging
This configuration will log to a mounted volume, using PostgreSQL logging, and not to Stderr / Docker logging as per the default image.
## PGBouncer
Add PGBouncer accounts with:
```bash
./generate-userlist pgb_admin >> userlist.txt
```
Update `pgbouncer.ini` adding the databases defined in POSTGRES_MULTIPLE_DATABASES to the `[databases]` section.