Skip to content

Commit 28f60cd

Browse files
committed
services/horizon: Fix docker-compose Postgres auth
By not pinning the Postgres version, authentication stopped working since now it requires either setting the Postgres password or an explicit `POSTGRES_HOST_AUTH_METHOD=trust`: ``` 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": https://www.postgresql.org/docs/current/auth-trust.html ``` Making this breaking change on a patch release is arguably a mistake on Postgres' end (see docker-library/postgres#681 (comment) ) but ... it is what it is. This commit sets `POSTGRES_HOST_AUTH_METHOD=trust` and also pins the patch number of Postgres to make it future-proof.
1 parent 77671a6 commit 28f60cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/horizon/docker/docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
core-postgres:
4-
image: postgres:9.6-alpine
4+
image: postgres:9.6.17-alpine
55
restart: on-failure
66
environment:
77
- POSTGRES_PASSWORD=mysecretpassword
@@ -30,9 +30,10 @@ services:
3030
network_mode: '${NETWORK_MODE:-bridge}'
3131

3232
horizon-postgres:
33-
image: postgres:9.6-alpine
33+
image: postgres:9.6.17-alpine
3434
restart: on-failure
3535
environment:
36+
- POSTGRES_HOST_AUTH_METHOD=trust
3637
- POSTGRES_DB=horizon
3738
ports:
3839
- "5432:5432"

0 commit comments

Comments
 (0)