From b7b81247e9012de10344241870d5aaa877f94aa6 Mon Sep 17 00:00:00 2001 From: Dan Milne Date: Wed, 19 Feb 2025 19:44:12 +1100 Subject: [PATCH] Docs --- multidb-pg-pgbouncer/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/multidb-pg-pgbouncer/README.md b/multidb-pg-pgbouncer/README.md index ffc9fec..6008961 100644 --- a/multidb-pg-pgbouncer/README.md +++ b/multidb-pg-pgbouncer/README.md @@ -1,8 +1,10 @@ # 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. +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. +The `multiple-databases.sh` script does the heavy lifting, creating the databases and the associated users. + +The original version creates users per database, with the same name as the database. This version sets the password for the users created to that of the postgres user. It also starts up a PGBouncer. @@ -14,7 +16,7 @@ Create a .env file with the following keys: * POSTGRES_PASSWORD ### Host IP -I use these with Tailscale - Use this to set the IP for Postgre to bind to. +Use this to set the IP for Postgres to bind to. ### Host Kind In the compose.yaml, you'll see `postgresql.${HOST_KIND}.conf`. This lets you have custom parameters for PostgreSQL per host type. Use https://pgtune.leopard.in.ua to build your own. @@ -29,7 +31,7 @@ Used to set the `postgres` user's password 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. +If you're using this for cache, say [SolidCache](https://github.com/rails/solid_cache), you may be happy to use named bind mountings and let Docker manage storage. Alternatively, bind mount a local directory for PostgreSQL to use.