fix: use trust auth for docker-postgres

Merged
SH
7mo ago
+1-0

Summary

Add POSTGRES_HOST_AUTH_METHOD=trust to the docker-postgres container.

Problem

POSTGRES_PASSWORD only sets the password on first container init. After crash recovery, the password in the auth system gets out of sync, causing password authentication failed errors that crash-loop paperclip and any other service using the postgres connection.

Fix

Trust all connections — no password needed. Safe since this postgres is only reachable from localhost/docker bridge, not exposed externally.

Note

Existing container needs to be recreated for this to take effect:

docker stop postgres && docker rm postgres
make systemctl-docker-postgres

Summary by cubic

Switch docker-postgres to trust auth by setting POSTGRES_HOST_AUTH_METHOD=trust. This prevents password mismatches after crash recovery that caused "password authentication failed" and crash loops in dependent services.

  • Migration
    • Recreate the container to apply the env var: run docker stop postgres && docker rm postgres, then make systemctl-docker-postgres.