From b412b0e44c540353481762430b946741872e88f4 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 17 Feb 2024 21:32:47 +0100 Subject: Set environment variables in the outer env Curl doesn't recognise variables set only through php-fpm's configuration. --- tw/services/php-fpm.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tw') diff --git a/tw/services/php-fpm.scm b/tw/services/php-fpm.scm index cb351829..e1ada838 100644 --- a/tw/services/php-fpm.scm +++ b/tw/services/php-fpm.scm @@ -115,8 +115,8 @@ "pm.process_idle_timeout =" (number->string pm.process-idle-timeout) "s\n"))) (map (match-lambda - ((variable . value) - (list "env[" variable "] =" value "\n"))) + ((variable . _) + (list "env[" variable "] = $" variable "\n"))) environment-variables) "php_flag[display_errors] = " (if display-errors "on" "off") "\n" @@ -148,6 +148,13 @@ #$@(if php-ini-file `("-c" ,php-ini-file) '())) + #:environment-variables + (cons* + #$@(map (match-lambda + ((variable . value) + #~(string-append #$variable "=" #$value))) + environment-variables) + (default-environment-variables)) #:pid-file #$pid-file)) (stop #~(make-kill-destructor))))))) -- cgit v1.2.3