fix: ensure PGID defaults to PUID when setting ownership for PostgreSQL SSL key (matching entrypoint.celery behavior.

This commit is contained in:
SergeantPanda 2026-03-23 18:26:52 -05:00
parent b30a24e2fb
commit 9da6f7794c

View file

@ -248,7 +248,7 @@ if [ -n "${POSTGRES_SSL_KEY:-}" ] && [ -f "$POSTGRES_SSL_KEY" ]; then
cp "$POSTGRES_SSL_KEY" "$_fixed_key"
chmod 600 "$_fixed_key"
if [ "$(id -u)" = "0" ] && [ -n "${PUID:-}" ]; then
chown "${PUID}:${PGID}" "$_fixed_key"
chown "${PUID}:${PGID:-$PUID}" "$_fixed_key"
fi
export POSTGRES_SSL_KEY="$_fixed_key"
# Update /etc/environment so login shells see the fixed path