diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-26 10:27:32 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-26 10:27:32 +0100 |
| commit | 690f218cbdf89327408ea75f2d21fde257a29411 (patch) | |
| tree | c0d695883f761afe8f1b0f0c90bdf73309cc1e5a /roles/cgit/templates | |
| parent | 9ec180130f0085340f3a6f2828b2f49d558a2548 (diff) | |
refactor git into cgit, git-daemon and git-http-backend
Diffstat (limited to 'roles/cgit/templates')
| -rw-r--r-- | roles/cgit/templates/cgitrc | 9 | ||||
| -rw-r--r-- | roles/cgit/templates/nginx/git.joeac.net.conf | 22 |
2 files changed, 31 insertions, 0 deletions
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; +} |
