forked from mtusi2026/mtusi2026lab7
16 lines
571 B
Bash
Executable File
16 lines
571 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
# PostgreSQL requires its private key to be owned by postgres and mode 0600.
|
|
# The role mount remains read-only; this copy is in the container's tmpfs.
|
|
umask 077
|
|
cp /run/identity/current/tls.key /tmp/postgres.key
|
|
chmod 600 /tmp/postgres.key
|
|
exec /usr/local/bin/docker-entrypoint.sh postgres \
|
|
-c ssl=on \
|
|
-c ssl_cert_file=/run/identity/current/tls.crt \
|
|
-c ssl_key_file=/tmp/postgres.key \
|
|
-c ssl_ca_file=/run/identity/current/ca.crt \
|
|
-c hba_file=/etc/postgresql/pg_hba.conf \
|
|
-c password_encryption=scram-sha-256 \
|
|
-c log_statement=none
|