How to fix error “Error: Database is uninitialized and superuser password is not specified.”

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

db:
    image: postgres:9.6-alpine
    environment:
      POSTGRES_DB: "db"
      POSTGRES_HOST_AUTH_METHOD: "trust"

The above will solve the error.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)