fix: prefer TLS for the legacy-api DB connection

보안 리뷰 지적(sslmode=disable). 사설 서브넷 안의 통신이지만 서버가 TLS를
제공하면 사용하도록 sslmode=prefer로 바꾼다(pgx 지원). 서버 인증서를 갖추는
WP-09에서 require로 올린다.
This commit is contained in:
seon committed 2026-09-24 00:02:00 +09:00
1 parent b101e92584
commit de771a5f1f
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ unset TOKEN
ENV_FILE=/opt/selfheal/legacy-api.env
umask 077
{
printf 'DB_DSN=postgres://app:%s@10.20.0.20:5432/app?sslmode=disable\n' "${DB_PASSWORD}"
printf 'DB_DSN=postgres://app:%s@10.20.0.20:5432/app?sslmode=prefer\n' "${DB_PASSWORD}"
} > "$ENV_FILE"
unset DB_PASSWORD
docker compose --env-file "$ENV_FILE" -f compose.yaml up -d --pull always --remove-orphans