feat(postgress): lab7 require TLS and switch apps to per-role DSNs

This commit is contained in:
Голиков Maximillian Антон
2026-11-25 12:45:20 +03:00
parent 71c9ded92f
commit 9c96b0c27d
3 changed files with 66 additions and 13 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
# PostgreSQL принимает закрытый ключ с правами 0600 и владельцем postgres.
umask 077
cp /run/postgres/server.key /tmp/lab-server.key
chown postgres:postgres /tmp/lab-server.key
chmod 0600 /tmp/lab-server.key
exec docker-entrypoint.sh postgres -c ssl=on -c ssl_min_protocol_version=TLSv1.2 \
-c ssl_cert_file=/run/postgres/server.crt -c ssl_key_file=/tmp/lab-server.key \
-c hba_file=/etc/postgresql/lab-hba.conf