hydra: web: Provide all-in-one 'guix-web-site-service-type'.
* hydra/modules/sysadmin/web.scm (guix-static-web-sites) (guix-web-site-service-type): New variables. * hydra/nginx/berlin.scm (%berlin-servers): Remove GUIX.GNU.ORG-NGINX-SERVER. * hydra/website.scm (website-services): Remove 'static-web-site-service-type' instance for guix.gnu.org and use 'guix-web-site-service-type' instead. * hydra/bayfront.scm <services>: Extend STATIC-WEB-SITE-SERVICE-TYPE for hpc.guix.info.
This commit is contained in:
parent
25be6ec34d
commit
601691e7ea
|
@ -915,8 +915,9 @@ access_log /var/log/nginx/bordeaux.access.log;"))
|
|||
(address (list gnu-ns1-ip4)))))))
|
||||
|
||||
;; Runnning hpc.guix.info.
|
||||
(service static-web-site-service-type
|
||||
(list guix-hpc-web-site))
|
||||
(simple-service 'guix-hpc-web-site
|
||||
static-web-site-service-type
|
||||
(list guix-hpc-web-site))
|
||||
|
||||
;; hpcguix-web as it can be seen at
|
||||
;; <https://hpc.guix.info/browse>.
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#:use-module (gnu services shepherd)
|
||||
#:use-module (gnu services web)
|
||||
#:use-module (gnu system shadow)
|
||||
#:use-module (sysadmin nginx)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (ice-9 match)
|
||||
#:export (build-program
|
||||
|
@ -46,6 +47,7 @@
|
|||
|
||||
static-web-site-service-type
|
||||
|
||||
guix-web-site-service-type
|
||||
gwl-web-service-type))
|
||||
|
||||
(define guix-extensions
|
||||
|
@ -219,7 +221,6 @@ that's built with Haunt or similar."
|
|||
(compose concatenate)
|
||||
(extend append)
|
||||
(extensions
|
||||
;; TODO: Extend nginx directly from here?
|
||||
(list (service-extension mcron-service-type
|
||||
static-web-site-mcron-jobs)
|
||||
(service-extension account-service-type
|
||||
|
@ -231,6 +232,68 @@ that's built with Haunt or similar."
|
|||
taken from a Git repository.")
|
||||
(default-value '())))
|
||||
|
||||
|
||||
;;;
|
||||
;;; GNU Guix web site at guix.gnu.org.
|
||||
;;;
|
||||
|
||||
(define guix-static-web-sites
|
||||
;; TODO: Add the manual of Cuirass.
|
||||
(list (static-web-site-configuration
|
||||
(git-url
|
||||
"https://git.savannah.gnu.org/git/guix/guix-artwork.git")
|
||||
(directory "/srv/guix.gnu.org")
|
||||
(build-file "website/.guix.scm"))
|
||||
|
||||
;; Manual for the latest stable release.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(git-ref '(branch . "version-1.3.0"))
|
||||
(period (* 24 3600)) ;check once per day
|
||||
(directory "/srv/guix-manual")
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables '(("GUIX_MANUAL_VERSION" . "1.3.0")
|
||||
("GUIX_WEB_SITE_URL" . "/"))))
|
||||
|
||||
;; Manual for 'master'.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(directory "/srv/guix-manual-devel")
|
||||
|
||||
;; XXX: Use a different cache directory to work around the fact that
|
||||
;; (guix git) would use a same-named checkout directory for 'master'
|
||||
;; and for the branch above. Since both mcron jobs run at the same
|
||||
;; time, they would end up using one branch or the other, in a
|
||||
;; non-deterministic way.
|
||||
(cache-directory "guix-master-manual")
|
||||
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables '(("GUIX_WEB_SITE_URL" . "/"))))
|
||||
|
||||
;; Cookbook for 'master'.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(directory "/srv/guix-cookbook")
|
||||
|
||||
;; XXX: Use a different cache directory (see above).
|
||||
(cache-directory "guix-cookbook-master")
|
||||
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables '(("GUIX_MANUAL" . "guix-cookbook")
|
||||
("GUIX_WEB_SITE_URL" . "/"))))))
|
||||
|
||||
(define guix-web-site-service-type
|
||||
(service-type
|
||||
(name 'guix-web-site)
|
||||
(extensions
|
||||
(list (service-extension static-web-site-service-type
|
||||
(const guix-static-web-sites))
|
||||
(service-extension nginx-service-type
|
||||
(const (list guix.gnu.org-nginx-server)))))
|
||||
(description
|
||||
"This service provides the web site of the GNU Guix project.")
|
||||
(default-value #t)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Guix Worflow Language.
|
||||
|
|
|
@ -295,8 +295,6 @@ PUBLISH-URL."
|
|||
(list "gzip_static always; gunzip on;\n"
|
||||
"access_log /var/log/nginx/disarchive.access.log;")))
|
||||
|
||||
guix.gnu.org-nginx-server
|
||||
|
||||
(nginx-server-configuration
|
||||
(listen '("443 ssl"))
|
||||
(server-name '("issues.guix.gnu.org"))
|
||||
|
|
|
@ -2,55 +2,7 @@
|
|||
"Return the list of Guix website services."
|
||||
(list
|
||||
;; Runnning guix.gnu.org.
|
||||
(service static-web-site-service-type
|
||||
(list (static-web-site-configuration
|
||||
(git-url
|
||||
"https://git.savannah.gnu.org/git/guix/guix-artwork.git")
|
||||
(directory "/srv/guix.gnu.org")
|
||||
(build-file "website/.guix.scm"))
|
||||
|
||||
;; Manual for the latest stable release.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(git-ref '(branch . "version-1.3.0"))
|
||||
(period (* 24 3600)) ;check once per day
|
||||
(directory "/srv/guix-manual")
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables
|
||||
'(("GUIX_MANUAL_VERSION" . "1.3.0")
|
||||
("GUIX_WEB_SITE_URL" . "/"))))
|
||||
|
||||
;; Manual for 'master'.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(directory "/srv/guix-manual-devel")
|
||||
|
||||
;; XXX: Use a different cache directory to work around
|
||||
;; the fact that (guix git) would use a same-named
|
||||
;; checkout directory for 'master' and for the branch
|
||||
;; above. Since both mcron jobs run at the same time,
|
||||
;; they would end up using one branch or the other, in
|
||||
;; a non-deterministic way.
|
||||
(cache-directory "guix-master-manual")
|
||||
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables
|
||||
'(("GUIX_WEB_SITE_URL" . "/"))))
|
||||
|
||||
;; Cookbook for 'master'.
|
||||
(static-web-site-configuration
|
||||
(git-url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(directory "/srv/guix-cookbook")
|
||||
|
||||
;; XXX: Use a different cache directory (see above).
|
||||
(cache-directory "guix-cookbook-master")
|
||||
|
||||
(build-file "doc/build.scm")
|
||||
(environment-variables
|
||||
'(("GUIX_MANUAL" . "guix-cookbook")
|
||||
("GUIX_WEB_SITE_URL" . "/"))))))
|
||||
|
||||
;; TODO: Add the manuals of Cuirass and GWL.
|
||||
(service guix-web-site-service-type)
|
||||
|
||||
;; The bootstrappable.org web site.
|
||||
(service static-web-site-service-type
|
||||
|
|
Loading…
Reference in New Issue