Files
mtusi2026lab7/infra/security/postgres.sh
T
kirill_dolda 280c5a3300
Skeleton contracts / contracts (pull_request) Blocked by required conditions
ЛР 7: безопасность, mTLS и OpenBao на оценку 3
2026-12-06 15:19:24 +03:00

10 lines
511 B
Bash

#!/bin/sh
set -eu
install -d -m 0700 -o postgres -g postgres /tmp/db-tls
install -m 0600 -o postgres -g postgres /run/identity/server.key /tmp/db-tls/server.key
install -m 0644 -o postgres -g postgres /run/identity/server.crt /tmp/db-tls/server.crt
export POSTGRES_PASSWORD_FILE=/run/identity/admin_password
exec docker-entrypoint.sh postgres \
-c ssl=on -c ssl_cert_file=/tmp/db-tls/server.crt -c ssl_key_file=/tmp/db-tls/server.key \
-c hba_file=/etc/lab7/pg_hba.conf -c password_encryption=scram-sha-256