Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker Compose creates postgres containers safely initialise the DB
POSTGRES_DB --- This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of POSTGRES_USER will be used.[1] Before, when we were providing a POSTGRES_USER we used the value of "postgres". This instructed postgres to create a database that did not match the name app-test or rails-template-development (depending on your environment). For some reason, this worked for a time but we noticed that throwing away all local database state within volumes, we got a database not found error on boot for any environment. This change explicitly instructs Postgres as to the name of the database we expect it to create. It should match the value we use at the end of DATABASE_URL. [1] https://hub.docker.com/_/postgres/
- Loading branch information