Skip to content

Commit fec53d8

Browse files
authored
Update README.md
1 parent 2c047ba commit fec53d8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Using multiple databases with the official PostgreSQL Docker image
22

3-
This fork merges [heliocastro:user_pass_improvements](https://github.com/heliocastro/docker-postgresql-multiple-databases/tree/user_pass_improvement)
3+
This fork merges [heliocastro:user_pass_improvements](https://github.com/heliocastro/docker-postgresql-multiple-databases/tree/user_pass_improvement) with some slight tweaks to keep the user name the same as the database name.
44

55
The [official recommendation](https://hub.docker.com/_/postgres/) for creating
66
multiple databases is as follows:
77

8-
*If you would like to do additional initialization in an image derived from
9-
this one, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts under
10-
`/docker-entrypoint-initdb.d` (creating the directory if necessary). After the
11-
entrypoint calls `initdb` to create the default `postgres` user and database,
12-
it will run any `*.sql` files and source any `*.sh` scripts found in that
13-
directory to do further initialization before starting the service.*
8+
> If you would like to do additional initialization in an image derived from
9+
> this one, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts under
10+
> `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the
11+
> entrypoint calls `initdb` to create the default `postgres` user and database,
12+
> it will run any `*.sql` files and source any `*.sh` scripts found in that
13+
> directory to do further initialization before starting the service.
1414
1515
This directory contains a script to create multiple databases using that
1616
mechanism.
@@ -28,7 +28,7 @@ Clone the repository, mount its directory as a volume into
2828
volumes:
2929
- ../docker-postgresql-multiple-databases:/docker-entrypoint-initdb.d
3030
environment:
31-
- POSTGRES_MULTIPLE_DATABASES=db1:user:pwd,db2:user:pwd
31+
- POSTGRES_MULTIPLE_DATABASES=db1:pwd1,db2:pwd2
3232
- POSTGRES_USER=myapp
3333
- POSTGRES_PASSWORD=
3434
- POSTGRES_DB=db
@@ -47,7 +47,7 @@ to the container:
4747
myapp-postgresql:
4848
image: eu.gcr.io/your-project/postgres-multi-db
4949
environment:
50-
- POSTGRES_MULTIPLE_DATABASES=db1,db2
50+
- POSTGRES_MULTIPLE_DATABASES=db1:pwd1,db2:pwd2
5151
- POSTGRES_USER=myapp
5252
- POSTGRES_PASSWORD=
5353
- POSTGRES_DB=db
@@ -57,4 +57,4 @@ to the container:
5757
If you need to use non-standard database names (hyphens, uppercase letters etc), quote them in `POSTGRES_MULTIPLE_DATABASES`:
5858

5959
environment:
60-
- POSTGRES_MULTIPLE_DATABASES="test-db-1:user:pwd","test-db-2:user:pwd"
60+
- POSTGRES_MULTIPLE_DATABASES="test-db-1:pwd1","test-db-2:pwd2"

0 commit comments

Comments
 (0)