diff --git a/multidb-pg-pgbouncer/README.md b/multidb-pg-pgbouncer/README.md index 58515ad..ffc9fec 100644 --- a/multidb-pg-pgbouncer/README.md +++ b/multidb-pg-pgbouncer/README.md @@ -2,6 +2,8 @@ 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. +The original version creates users per database, with the same name as teh database. This version sets the password for the users created to that of the postgres user. + It also starts up a PGBouncer. ## ENV file @@ -23,6 +25,9 @@ In the compose.yaml, you'll see `postgresql.${HOST_KIND}.conf`. This lets you ha ### POSTGRES_PASSWORD Used to set the `postgres` user's password +### POSTGRES_MULTIPLE_DATABASES +Set the `POSTGRES_MULTIPLE_DATABASES` value in `compose.yaml` to a series of comma separated database names. + ## Data directory If you're using this for Cache, per SolidCache, you may be happy to use named bind mountings and let Docker manage storage. diff --git a/multidb-pg-pgbouncer/compose.yaml b/multidb-pg-pgbouncer/compose.yaml index 6917133..2cae95f 100644 --- a/multidb-pg-pgbouncer/compose.yaml +++ b/multidb-pg-pgbouncer/compose.yaml @@ -4,7 +4,7 @@ services: image: postgres:17 environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_MULTIPLE_DATABASES: solid_cache, solid_queue + POSTGRES_MULTIPLE_DATABASES: database1, database2 ports: - "${HOST_IP}:5432:5432" volumes: