aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-07-28 16:17:30 +0100
committerArun Isaac2023-08-09 21:29:12 +0100
commitb6d843c2dd619625e794ab9a653756d3cc15068c (patch)
tree52ceaedfc0a31cf86b8c120898f0d10852a6d7ea
parentd6668221e7ce7b1b1074cb1bb1092bb6e44ec0ac (diff)
downloadguix-forge-b6d843c2dd619625e794ab9a653756d3cc15068c.tar.gz
guix-forge-b6d843c2dd619625e794ab9a653756d3cc15068c.tar.lz
guix-forge-b6d843c2dd619625e794ab9a653756d3cc15068c.zip
gunicorn: Support <forge-host-socket> sockets.
* guix/forge/gunicorn.scm (socket->gunicorn-bind): Support <forge-host-socket> sockets. * doc/forge.skb (Reference): Document it.
-rw-r--r--doc/forge.skb5
-rw-r--r--guix/forge/gunicorn.scm2
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/forge.skb b/doc/forge.skb
index 23d8faf..f084dd4 100644
--- a/doc/forge.skb
+++ b/doc/forge.skb
@@ -513,8 +513,9 @@ gunicorn apps to run]))
(record-field "wsgi-app-module"
[WSGI app module passed to gunicorn])
(record-field "sockets"
- [List of ,(record-ref "<forge-ip-socket>") or ,(record-ref
-"<forge-unix-socket>") objects describing sockets to listen on])
+ [List of ,(record-ref "<forge-host-socket>"), ,(record-ref
+"<forge-ip-socket>") or ,(record-ref "<forge-unix-socket>") objects
+describing sockets to listen on])
(record-field "workers"
[Number of worker processes])
(record-field "environment-variables"
diff --git a/guix/forge/gunicorn.scm b/guix/forge/gunicorn.scm
index 0bd9461..0f7ec91 100644
--- a/guix/forge/gunicorn.scm
+++ b/guix/forge/gunicorn.scm
@@ -123,6 +123,8 @@
(define socket->gunicorn-bind
(match-lambda
+ (($ <forge-host-socket> hostname port)
+ (string-append hostname ":" port))
(($ <forge-ip-socket> (? ipv4-address? ip) port)
(string-append ip ":" (number->string port)))
(($ <forge-ip-socket> (? ipv6-address? ip) port)