Docker image for Cgit a web interface for Git repositories.
The image compiles and deploys Cgit with Nginx and fcgiwrap.
To run it:
docker compose up
And then open the URL localhost:8082
. If you want to customize the compilation, installation or configuration, edit the corresponding files.
- You can check and edit the Cgit configuration of the image in the
cgitrc
file. - The Nginx configuration is in the
cgit_nginx.conf
file. cgit_build.conf
contains environment variables for Cgit compilation. You need to edit it if you want to use different paths.
If you want to use your own settings you can mount your cgitrc
file as follows.
services:
cgit:
hostname: cgit
image: cgit:latest
build: .
ports:
- "8080:80"
restart: on-failure:5
volumes:
- type: bind
source: ./path/to/cgitrc
target: /opt/cgit/cgitrc
The Cgit scan-path
configuration parameter is set to read repositories from the /opt/git
path. That path can be mounted as a volume.
volumes:
- git-vlume:/opt/git/