]> git.openstreetmap.org Git - rails.git/commitdiff
Postgres is no longer starting
authorJamie Alessio <jamie@urbanfootprint.com>
Sun, 16 Feb 2020 01:10:45 +0000 (01:10 +0000)
committerMichal Migurski <migurski@fb.com>
Thu, 28 Jan 2021 20:03:58 +0000 (12:03 -0800)
Fails with:
db_1   | Error: Database is uninitialized and superuser password is not specified.
db_1   |        You must specify POSTGRES_PASSWORD for the superuser. Use
db_1   |        "-e POSTGRES_PASSWORD=password" to set it in "docker run".
db_1   |
db_1   |        You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
db_1   |        without a password. This is *not* recommended. See PostgreSQL
db_1   |        documentation about "trust":
db_1   |        https://www.postgresql.org/docs/current/auth-trust.html

Appears to be related to
https://github.com/docker-library/postgres/issues/681

docker-compose.yml

index 70730febfca4f1a33322a335fcc794f49c7c7e10..dbdd62731b89cb44b90d082705ee2d4255a1be9f 100644 (file)
@@ -19,6 +19,7 @@ services:
     ports:
       - "54321:5432"
     environment:
     ports:
       - "54321:5432"
     environment:
+      POSTGRES_HOST_AUTH_METHOD: trust
       POSTGRES_DB: openstreetmap
     volumes:
       - ./docker-db-data:/var/lib/postgresql/data
       POSTGRES_DB: openstreetmap
     volumes:
       - ./docker-db-data:/var/lib/postgresql/data