From 690f218cbdf89327408ea75f2d21fde257a29411 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Wed, 26 Aug 2026 10:27:32 +0100 Subject: refactor git into cgit, git-daemon and git-http-backend --- roles/cgit/templates/cgitrc | 9 +++++++++ roles/cgit/templates/nginx/git.joeac.net.conf | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 roles/cgit/templates/cgitrc create mode 100644 roles/cgit/templates/nginx/git.joeac.net.conf (limited to 'roles/cgit/templates') diff --git a/roles/cgit/templates/cgitrc b/roles/cgit/templates/cgitrc new file mode 100644 index 0000000..64ba6d4 --- /dev/null +++ b/roles/cgit/templates/cgitrc @@ -0,0 +1,9 @@ +root-title=joeac's git repositories +root-desc= +strict-export={{ git_export_ok_file }} +scan-path={{ git_directory }} +virtual-root=/ +about-filter=/usr/lib/cgit/filters/about-formatting.sh +readme=:README.md +snapshots=tar.gz zip +clone-prefix=git://git.joeac.net https://git.joeac.net diff --git a/roles/cgit/templates/nginx/git.joeac.net.conf b/roles/cgit/templates/nginx/git.joeac.net.conf new file mode 100644 index 0000000..704665e --- /dev/null +++ b/roles/cgit/templates/nginx/git.joeac.net.conf @@ -0,0 +1,22 @@ +server { + listen {{ services.git.port }}; + listen [::]:{{ services.git.port }}; + server_name {{ ( subdomains | selectattr('service', 'eq', 'git') | first ).full_domain }}; + + root /usr/share/webapps/cgit; + try_files $uri @cgit; + + access_log /var/log/nginx/git.joeac.net/access.log; + error_log /var/log/nginx/git.joeac.net/error.log; + + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + fastcgi_pass unix:{{ fcgiwrap_socket }}; + } + + include {{ git_nginx_include_directory }}/*.conf; +} -- cgit v1.2.3