diff options
author | Timo Wilken | 2024-02-17 21:32:47 +0100 |
---|---|---|
committer | Timo Wilken | 2024-02-25 21:30:32 +0100 |
commit | b412b0e44c540353481762430b946741872e88f4 (patch) | |
tree | 433da8f5ed5fcee25c8bc449e5f59757df1e6375 /tw | |
parent | e29e98b560907802715da8336d2e1e514f177188 (diff) |
Set environment variables in the outer env
Curl doesn't recognise variables set only through php-fpm's configuration.
Diffstat (limited to 'tw')
-rw-r--r-- | tw/services/php-fpm.scm | 11 |
1 files changed, 9 insertions, 2 deletions
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))))))) |