From 08b9dd6a9a5e80bc9e1679cfd88b06bd3956f4bb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 27 Jul 2023 18:19:20 +0100 Subject: gunicorn: Set default socket to Unix socket. * guix/forge/gunicorn.scm (): Add this-gunicorn-app self-reference. [sockets]: Make field thunked. Set default to Unix socket. --- guix/forge/gunicorn.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'guix/forge') diff --git a/guix/forge/gunicorn.scm b/guix/forge/gunicorn.scm index 70142f5..1ae7d6f 100644 --- a/guix/forge/gunicorn.scm +++ b/guix/forge/gunicorn.scm @@ -63,13 +63,16 @@ (define-record-type* gunicorn-app make-gunicorn-app gunicorn-app? + this-gunicorn-app (name gunicorn-app-name) (package gunicorn-app-package) (wsgi-app-module gunicorn-app-wsgi-app-module) (sockets gunicorn-app-sockets - (default (list (forge-ip-socket - (ip "127.0.0.1") - (port 8080))))) + (default (list (forge-unix-socket + (path (string-append "/var/run/gunicorn/" + (gunicorn-app-name this-gunicorn-app) + "/socket"))))) + (thunked)) (workers gunicorn-app-workers (default 1)) (environment-variables gunicorn-app-environment-variables -- cgit v1.2.3