Overwrite pg_hba.conf entirely to ensure no hostssl exists
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ services:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: sop_monitoring
|
||||
FORCE_RESTART: 2
|
||||
FORCE_RESTART: 3
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
command: >
|
||||
sh -c "find /var/lib/postgresql/data -name pg_hba.conf -exec sed -i 's/hostssl/host/g' {} + || true; find /var/lib/postgresql/data -name pg_hba.conf -exec sh -c 'echo \"host all all all md5\" >> \"$1\"; echo \"host all all all scram-sha-256\" >> \"$1\"' _ {} \;"
|
||||
sh -c "find /var/lib/postgresql/data -name pg_hba.conf -exec sh -c 'echo \"local all all trust\" > \"$1\"; echo \"host all all 127.0.0.1/32 trust\" >> \"$1\"; echo \"host all all ::1/128 trust\" >> \"$1\"; echo \"host all all all md5\" >> \"$1\"; echo \"host all all all scram-sha-256\" >> \"$1\"' _ {} \;"
|
||||
|
||||
|
||||
api:
|
||||
|
||||
Reference in New Issue
Block a user