aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: d99463e6a1a615ea6129399e09f3cd3421ea082d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
> [!WARNING]
> Note that I do NOT use every single feature of cgit. Some dependencies
> required for some filters might be missing.

Before building you need to download the `cgit` source code. There's already a
reference to it as a submodule. To download just run `git submodule update
--init --recursive`.

After running the container you just configure your webserver to use the exposed
unix socket (`./stuff/fcgi.sock`) with `fastcgi`.

Following a Caddy config example using the official caddy docker alpine image:
```Cadyfile
my.cgit.domain {
	handle_path /static/* {
		root /srv/cgit
		file_server
	}

	handle {
		reverse_proxy unix//fcgi.sock {
			transport fastcgi {
				env SCRIPT_FILENAME /cgit/www/cgit.cgi
			}
		}
	}
}
```

Obviously when using caddy you have to mount the cgit `www` folder onto the
caddy container as well. The same goes for the socket exposed by this container.
So everytime you restart this container you need to restart the caddy container.

Note that `SCRIPT_FILENAME` is set to the location of cgit file in the cgit
container.
XMR address: 854DmXNrxULU3ZFJVs4Wc8PFhbq29RhqHhY8W6cdWrtFN3qmooKyyeYPcDzZTNRxphhJ5UzASQfAdEMwSteVqymk28aLhqj