From 16bd3f492ccf129c8f100a3566be314d109ebf26 Mon Sep 17 00:00:00 2001 From: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com> Date: Mon, 5 Jan 2026 22:48:39 +0530 Subject: [PATCH] Add PostgreSQL SSL options to entrypoint script Signed-off-by: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com> --- 31/fpm/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/31/fpm/entrypoint.sh b/31/fpm/entrypoint.sh index e3b88f14..4e3a851c 100755 --- a/31/fpm/entrypoint.sh +++ b/31/fpm/entrypoint.sh @@ -216,6 +216,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_DB file_env POSTGRES_PASSWORD file_env POSTGRES_USER + if [ -n "$POSTGRES_SSLMODE" ]; then + # 1000 is the internal PHP PDO constant for PDO::PGSQL_ATTR_SSL_MODE + run_as 'php /var/www/html/occ config:system:set dbdriveroptions 1000 --value="'$POSTGRES_SSLMODE'" --type=string' +fi + +if [ -n "$POSTGRES_SSLCA" ]; then + # 1012 is the internal PHP PDO constant for PDO::PGSQL_ATTR_SSL_CA + run_as 'php /var/www/html/occ config:system:set dbdriveroptions 1012 --value="'$POSTGRES_SSLCA'" --type=string' +fi if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database"