mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-19 10:18:58 +02:00
Add complete codesearch role with zoekt implementation. Zoekt provides disk-based sharded indexing that avoids OOM issues on 8GB systems, with per-package .zoekt shard files and automatic discovery. - Implement fetch-sources script that clones archlinux/packaging/state to determine current package list and versions, then downloads PKGBUILDs and upstream sources from GitLab with parallel job support and idempotent re-runs - Add zoekt-webserver systemd service for search frontend - Add zoekt-index service/timer for incremental index generation - Configure nginx reverse proxy to port 6070 with TLS - Set up firewall rules for HTTP/HTTPS and monitoring access Architecture: - codesearch-extract.timer: Daily fetch trigger - codesearch-extract.service: Runs fetch-sources to download sources - codesearch-index.timer: Runs every 5 minutes after extraction - codesearch-index.service: Builds zoekt shards - codesearch-webserver.service: Serves search UI from disk shards Fixes: infrastructure#808 Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
38 lines
1.2 KiB
Django/Jinja
38 lines
1.2 KiB
Django/Jinja
server {
|
|
include snippets/listen-80.conf;
|
|
|
|
server_name {{ codesearch_domain }};
|
|
|
|
access_log /var/log/nginx/{{ codesearch_domain }}/access.log reduced;
|
|
access_log /var/log/nginx/{{ codesearch_domain }}/access.log.json json_reduced;
|
|
error_log /var/log/nginx/{{ codesearch_domain }}/error.log;
|
|
|
|
include snippets/letsencrypt.conf;
|
|
|
|
location / {
|
|
access_log off;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
include snippets/listen-443.conf;
|
|
server_name {{ codesearch_domain }};
|
|
|
|
access_log /var/log/nginx/{{ codesearch_domain }}/access.log reduced;
|
|
access_log /var/log/nginx/{{ codesearch_domain }}/access.log.json json_reduced;
|
|
error_log /var/log/nginx/{{ codesearch_domain }}/error.log;
|
|
|
|
acme_certificate letsencrypt;
|
|
ssl_certificate $acme_certificate;
|
|
ssl_certificate_key $acme_certificate_key;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:{{ codesearch_zoekt_web_port }};
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|