A breaking change was recently made to the Postgres 9.x images available on Docker Hub. You can find the relevant PR at https://github.com/docker-library/postgres/pull/658

The change is intended to make Postgres more secure by default and was determined by the Postgres maintainers to be a necessary break.

You may encounter the following error during project creation.

Waiting for local database serverCouldn't connect to database container. Database server may not be started.

Alternatively, you may see the following in log output.

Error: Database is uninitialized and superuser password is not specified.
       You must specify POSTGRES_PASSWORD for the superuser. Use
       "-e POSTGRES_PASSWORD=password" to set it in "docker run".

       You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
       without a password. This is *not* recommended. See PostgreSQL
       documentation about "trust":

We recommend reading the Postgres authentication documentation to fully understand authentication settings.

You can use the POSTGRES_HOST_AUTH_METHOD environment property by making the following change to your docker-compose.yml.


    image: postgres:9.6-alpine
      POSTGRES_DB: "db"


    image: postgres:9.6-alpine
      POSTGRES_DB: "db"

Once you have made this change, you can proceed to update your Divio project in the usual way.

docker-compose stop 
docker-compose up -d db
divio project update

Note that Divio have already implemented this change so new projects will already have this environment variable set.

Did this answer your question?