https://github.com/mroik/cgit-docker
Everything needed to run a cgit instance in a docker container
https://github.com/mroik/cgit-docker
cgit container docker git
Last synced: 22 days ago
JSON representation
Everything needed to run a cgit instance in a docker container
- Host: GitHub
- URL: https://github.com/mroik/cgit-docker
- Owner: Mroik
- License: wtfpl
- Created: 2026-01-24T09:38:18.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-03-02T12:38:37.000Z (4 months ago)
- Last Synced: 2026-03-02T16:35:07.101Z (4 months ago)
- Topics: cgit, container, docker, git
- Language: Dockerfile
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> [!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`.
If you don't want to build from source you can just use the image provided
though ghcr: e.g. `ghcr.io/mroik/cgit-docker:cgit-v1.3.1`
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.