From bdd2396d19f5465ecaac3195deeceef29a867d52 Mon Sep 17 00:00:00 2001 From: dautor Date: Fri, 15 Nov 2024 13:47:50 +0100 Subject: Create example structure and add 2 examples --- cgit/host/conf | 23 ++++++++++++++++++++ cgit/host/root/etc/rc.conf | 6 ++++++ cgit/host/root/etc/resolv.conf | 1 + cgit/host/root/usr/local/etc/cgitrc | 10 +++++++++ cgit/host/root/usr/local/etc/nginx/nginx.conf | 31 +++++++++++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 cgit/host/conf create mode 100644 cgit/host/root/etc/rc.conf create mode 100644 cgit/host/root/etc/resolv.conf create mode 100644 cgit/host/root/usr/local/etc/cgitrc create mode 100644 cgit/host/root/usr/local/etc/nginx/nginx.conf (limited to 'cgit/host') diff --git a/cgit/host/conf b/cgit/host/conf new file mode 100644 index 0000000..1471d6f --- /dev/null +++ b/cgit/host/conf @@ -0,0 +1,23 @@ +{ + module: sf.jail + configuration: { + interfaces: { + eth0 { type: eiface } + } + filesystem: { + layers: [ + cgit/host/root + /tmp/lamina.cgit + /tmp/lamina.machine + /lab/jail/base/14.1-RELEASE + ] + temporary: /tmp/cgit_host + volumes: [ + { source: "/lab/git", target: "/git" } + ] + devfs: 0 + } + init: [ sh, /etc/rc ] + shutdown: [ sh, /etc/rc.shutdown ] + } +} diff --git a/cgit/host/root/etc/rc.conf b/cgit/host/root/etc/rc.conf new file mode 100644 index 0000000..9d1ff9d --- /dev/null +++ b/cgit/host/root/etc/rc.conf @@ -0,0 +1,6 @@ +hostname="cgit" +ifconfig_eth0="inet 10.2.0.2/24 up" +defaultrouter="10.2.0.1" + +fcgiwrap_enable="YES" +nginx_enable="YES" diff --git a/cgit/host/root/etc/resolv.conf b/cgit/host/root/etc/resolv.conf new file mode 100644 index 0000000..35fb6f9 --- /dev/null +++ b/cgit/host/root/etc/resolv.conf @@ -0,0 +1 @@ +nameserver 1.0.0.1 diff --git a/cgit/host/root/usr/local/etc/cgitrc b/cgit/host/root/usr/local/etc/cgitrc new file mode 100644 index 0000000..5622531 --- /dev/null +++ b/cgit/host/root/usr/local/etc/cgitrc @@ -0,0 +1,10 @@ +css=/cgit.css +logo=/cgit.png + +virtual-root=/ +clone-prefix=http://10.2.0.2 +root-title=git server +root-desc= +readme=master:README.md + +scan-path=/git diff --git a/cgit/host/root/usr/local/etc/nginx/nginx.conf b/cgit/host/root/usr/local/etc/nginx/nginx.conf new file mode 100644 index 0000000..f779a68 --- /dev/null +++ b/cgit/host/root/usr/local/etc/nginx/nginx.conf @@ -0,0 +1,31 @@ + +user nobody; +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + gzip on; + + server { + listen 80 default_server; + + root /usr/local/www/cgit; + try_files $uri @cgit; + + location @cgit { + fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/local/www/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + } + } +} -- cgit v1.2.3