From b6d843c2dd619625e794ab9a653756d3cc15068c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 28 Jul 2023 16:17:30 +0100 Subject: gunicorn: Support sockets. * guix/forge/gunicorn.scm (socket->gunicorn-bind): Support sockets. * doc/forge.skb (Reference): Document it. --- doc/forge.skb | 5 +++-- guix/forge/gunicorn.scm | 2 ++ 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 "") or ,(record-ref -"") objects describing sockets to listen on]) + [List of ,(record-ref ""), ,(record-ref +"") or ,(record-ref "") 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 + (($ hostname port) + (string-append hostname ":" port)) (($ (? ipv4-address? ip) port) (string-append ip ":" (number->string port))) (($ (? ipv6-address? ip) port) -- cgit v1.2.3