From 8a8477df910bdc172f298666cf09a94e6ac81b36 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 26 Jul 2023 00:07:41 +0100 Subject: klaus: Serve klaus on a Unix socket by default. * guix/forge/klaus.scm: Import (forge socket). (klaus-gunicorn-app): Make sockets a keyword argument with a singleton list of Unix sockets as the default. --- guix/forge/klaus.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'guix/forge/klaus.scm') diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm index 54b374f..12560ed 100644 --- a/guix/forge/klaus.scm +++ b/guix/forge/klaus.scm @@ -19,6 +19,7 @@ (define-module (forge klaus) #:use-module (forge gunicorn) + #:use-module (forge socket) #:use-module ((gnu packages check) #:select (python-nose python-pytest)) #:use-module ((gnu packages python-web) #:select (python-flask python-werkzeug)) @@ -121,15 +122,19 @@ routes using HTTP Digest Authentication.") @end itemize") (license license:isc))) -(define* (klaus-gunicorn-app repository-directory sockets - #:key site-name) - "Return a @code{} object to deploy klaus on -@var{sockets}, a list of @code{} or -@code{} objects. +(define* (klaus-gunicorn-app repository-directory + #:key + (sockets (list (forge-unix-socket + (path "/var/run/gunicorn-klaus/socket")))) + site-name) + "Return a @code{} object to deploy klaus. @var{repository-directory} is the path to the directory containing git repositories to serve. +@var{sockets} is a list of @code{} or +@code{} objects describing sockets to listen on. + @var{site-name} is the name of the klaus site to be displayed in the banner." (gunicorn-app -- cgit v1.2.3