Yet more generic. More docs
This commit is contained in:
@@ -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.
|
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.
|
It also starts up a PGBouncer.
|
||||||
|
|
||||||
## ENV file
|
## ENV file
|
||||||
@@ -23,6 +25,9 @@ In the compose.yaml, you'll see `postgresql.${HOST_KIND}.conf`. This lets you ha
|
|||||||
### POSTGRES_PASSWORD
|
### POSTGRES_PASSWORD
|
||||||
Used to set the `postgres` user's 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
|
## 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, per SolidCache, you may be happy to use named bind mountings and let Docker manage storage.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ services:
|
|||||||
image: postgres:17
|
image: postgres:17
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
POSTGRES_MULTIPLE_DATABASES: solid_cache, solid_queue
|
POSTGRES_MULTIPLE_DATABASES: database1, database2
|
||||||
ports:
|
ports:
|
||||||
- "${HOST_IP}:5432:5432"
|
- "${HOST_IP}:5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user