Commit Graph

13 Commits

Author SHA1 Message Date
Ludovic Courtès c1cfb3b793
hydra: nginx: Add “Access-Control-Allow-Origin” header on /packages.json.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
“add_header” directive for /packages.json.
2023-10-17 16:04:21 +02:00
Ludovic Courtès e712907558
hydra: nginx: Add ‘Cache-Control’ header on /{packages,sources}.json.
This allows for client-side caching.

* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
“expires” directives for /{packages,sources}.json.
2023-10-10 10:49:16 +02:00
Ludovic Courtès aa77e3806b
hydra: nginx: Send /packages.json and /sources.json gzipped.
This sends them as “Content-Encoding: gzip”, as a followup to
1123fd81ce.

* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations):
Remove “gunzip on” from /{packages,sources}.json.
2023-10-09 21:16:23 +02:00
Ludovic Courtès 1123fd81ce
hydra: build-package-metadata: Compress JSON files.
* hydra/build-package-metadata.scm (write-json): Use
‘call-with-gzip-output-port’.
(main): Append “.gz” to JSON file names.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
“gzip_static” and “gunzip” directives on /packages.json and
/sources.json.
2023-10-09 10:57:31 +02:00
Ludovic Courtès 97cbea05bf
hydra: nginx: Add missing semicolons.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
missing semicolons.
2023-01-04 23:07:07 +01:00
Ludovic Courtès af5dab2543
hydra: nginx: Fix "if_modified_since" value.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations):
Change "if_modified_since" value to "exact".
2023-01-04 23:03:24 +01:00
Ludovic Courtès 5664984bdd
hydra: web: Add mcron job to build /packages.json and /sources.json.
Previously, these two files were built as part of the web site's build
process.

* hydra/modules/sysadmin/web.scm (%package-metadata-directory)
(guix-web-site-mcron-jobs, guix-web-site-activation): New variables.
(guix-web-site-service-type): Add extensions using them.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
locations for /packages.json and /sources.json.
2023-01-04 22:06:04 +01:00
Ludovic Courtès e97f78bd61
hydra: nginx: Redirect /packages to packages.guix.gnu.org.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-redirect-locations):
Add location blocks for /packages and /LANG/packages.
2022-11-25 19:07:38 +01:00
Ludovic Courtès 464a4b35dd
hydra: nginx: Listen on IPv6 for guix.gnu.org.
* hydra/bayfront.scm (%guix.gnu.org-http-nginx-servers): Add IPv6
'lisetn' clause.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-nginx-server): Likewise.
2022-11-18 11:31:58 +01:00
Tobias Geerinckx-Rice ead77feb81
hydra: Fix ‘…/manual’-style URLs without a trailing ‘/’.
These are used in, e.g., Guix System's /etc/os-release and were
embarrassingly broken.

* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations):
Handle the absence of a trailing ‘/’ in manual & cookbook URLs.
2022-06-12 02:00:00 +02:00
Ludovic Courtès 6c969b482e
hydra: Drop TLSv1 and enable TLSv1.3.
* hydra/bayfront.scm (%hpc.guix.info-nginx-servers)
(%guix-hpc.bordeaux.inria.fr-nginx-servers)
(%logs.guix.gnu.org-nginx-servers)
(%coordinator.bayfront.guix.gnu.org-nginx-servers)
(%bayfront.guix.gnu.org-nginx-servers)
(%bordeaux.guix.gnu.org-nginx-servers): Change 'ssl_protocols' nginx
setting to "TLSv1.1 TLSv1.2 TLSv1.3".
* hydra/lakeside.scm (%nginx-server-blocks): Likewise.
* hydra/modules/sysadmin/nginx.scm (%tls-settings): Likewise.
* hydra/nginx/hydra.gnu.org.conf: Likewise.
* hydra/nginx/mirror.conf: Likewise.
2022-06-06 11:48:35 +02:00
Julien Lepiller bf537f9cb0
hydra: berlin: Support `ja' language.
* hydra/modules/sysadmin/nginx.scm (languages-to-accept): Add ja.
2022-04-09 11:55:47 +02:00
Ludovic Courtès 4cf3743e0d
hydra: Add (sysadmin nginx) module.
This factorizes the guix.gnu.org web site configuration.
The nginx.conf derivation for berlin.scm is left unchanged.

* hydra/nginx/berlin.scm (le, redirect, %tls-settings)
(guix.gnu.org-redirect-locations, languages-to-accept)
(guix.gnu.org-redirects-for-each-language)
(guix.gnu.org-other-locations, accept-languages): Move to...
* hydra/modules/sysadmin/nginx.scm: ... here.
* hydra/nginx/berlin.scm (%berlin-servers): Use
GUIX.GNU.ORG-NGINX-SERVER instead of the inline copy.
2021-12-22 12:50:00 +01:00