guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: hydra: lakeside: Pass nar requests through the nar-herder.


From: Christopher Baines
Subject: 01/04: hydra: lakeside: Pass nar requests through the nar-herder.
Date: Fri, 22 Apr 2022 13:29:04 -0400 (EDT)

cbaines pushed a commit to branch master
in repository maintenance.

commit 967ceb71421d4fc95be9d73c06182f508174d96b
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Apr 22 16:02:16 2022 +0100

    hydra: lakeside: Pass nar requests through the nar-herder.
    
    This means the nar-herder can instrument the requests for nars. This
    commit also exposes nar-herder metrics through NGinx.
    
    * hydra/lakeside.scm (%nginx-server-blocks): Proxy /nar requests to
    the nar-herder, and expose /metrics.
---
 hydra/lakeside.scm | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/hydra/lakeside.scm b/hydra/lakeside.scm
index 8c1eb5e..1600cb6 100644
--- a/hydra/lakeside.scm
+++ b/hydra/lakeside.scm
@@ -26,8 +26,21 @@
            (body '("proxy_pass http://nar-herder;";)))
           (nginx-location-configuration
            (uri "/nar/")
+           (body '("proxy_pass http://nar-herder;";)))
+          (nginx-location-configuration
+           (uri "= /latest-database-dump")
+           (body '("proxy_pass http://nar-herder;";)))
+          (nginx-location-configuration
+           (uri "= /recent-changes")
+           (body '("proxy_pass http://nar-herder;";)))
+          (nginx-location-configuration
+           (uri "= /metrics")
+           (body '("proxy_pass http://nar-herder;";)))
+          (nginx-location-configuration
+           (uri "~ ^/internal/nar/(.*)$")
            (body '("
-    root /var/lib/nars;
+    internal;
+    alias /var/lib/nars/nar/$1;
 
     error_page 404 /404;
 
@@ -36,12 +49,6 @@
     # Nars are already compressed.
     gzip off;
 ")))
-          (nginx-location-configuration
-           (uri "= /latest-database-dump")
-           (body '("proxy_pass http://nar-herder;";)))
-          (nginx-location-configuration
-           (uri "= /recent-changes")
-           (body '("proxy_pass http://nar-herder;";)))
           (nginx-location-configuration
            (uri "~ ^/internal/database/(.*)$")
            (body '("internal;"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]