aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick M. Muriithi2024-04-10 08:33:23 +0000
committerArun Isaac2024-04-11 01:41:58 +0100
commit1ed28e325f241f3e480cfad331021f0676445a17 (patch)
tree9e846947294a59738ac5ad6eec26853a1f0af847
parent6c622a67051c22eeefe37eedb17d427fbb70c99b (diff)
downloadguix-forge-1ed28e325f241f3e480cfad331021f0676445a17.tar.gz
guix-forge-1ed28e325f241f3e480cfad331021f0676445a17.tar.lz
guix-forge-1ed28e325f241f3e480cfad331021f0676445a17.zip
gunicorn: Support unstructured extra CLI arguments.
The most useful options (e.g. "--workers", "--timeout", "--env") have dedicated slots in the <gunicorn-app> structure. These, however, are not the only options available to pass to gunicorn at startup. This commit allows us to pass in a list of any extra CLI options we want on the CLI. * guix/forge/gunicorn.scm (<gunicorn-app>)[extra-cli-arguments]: New field. (gunicorn-shepherd-services): Use extra-cli-arguments field. * doc/forge.skb (Services)[Specialized application deployment services]{gunicorn service}<gunicorn-app>: Document extra-cli-arguments field. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
-rw-r--r--doc/forge.skb4
-rw-r--r--guix/forge/gunicorn.scm5
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/forge.skb b/doc/forge.skb
index 99d1b86..f1f69b1 100644
--- a/doc/forge.skb
+++ b/doc/forge.skb
@@ -1,5 +1,6 @@
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2022–2024 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2024 Frederick M. Muriithi <fredmanglis@protonmail.com>
;;;
;;; This file is part of guix-forge.
;;;
@@ -494,6 +495,9 @@ describing sockets to listen on])
(record-field "timeout"
[Workers silent for more than this many seconds are
killed and restarted.])
+ (record-field "extra-cli-arguments"
+ [List of strings to pass as additional command-line
+arguments to gunicorn])
(record-field "environment-variables"
[List of ,(record-ref "<environment-variable>") objects
describing environment variables that should be set in the execution
diff --git a/guix/forge/gunicorn.scm b/guix/forge/gunicorn.scm
index 148bd53..a86dd7a 100644
--- a/guix/forge/gunicorn.scm
+++ b/guix/forge/gunicorn.scm
@@ -1,5 +1,6 @@
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2023–2024 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2024 Frederick M. Muriithi <fredmanglis@protonmail.com>
;;;
;;; This file is part of guix-forge.
;;;
@@ -51,6 +52,7 @@
gunicorn-app-sockets
gunicorn-app-workers
gunicorn-app-timeout
+ gunicorn-app-extra-cli-arguments
gunicorn-app-environment-variables
gunicorn-app-mappings))
@@ -77,6 +79,8 @@
(thunked))
(workers gunicorn-app-workers
(default 1))
+ (extra-cli-arguments gunicorn-app-extra-cli-arguments
+ (default '()))
(environment-variables gunicorn-app-environment-variables
(default '()))
(timeout gunicorn-app-timeout
@@ -197,6 +201,7 @@
"="
#$(environment-variable-value variable))))
(gunicorn-app-environment-variables app))
+ (gunicorn-app-extra-cli-arguments app)
(list (gunicorn-app-wsgi-app-module app)))))
#:user #$name
#:group #$name