Sign inSign up

cbinder20/cgit

By cbinder20

•Updated 6 months ago

Custom cgit server built on debian slim running nginx and fcgiwrap.

Image
0

920

cbinder20/cgit repository overview

⁠Custom CGit Server

A lightweight containerized cgit instance with support for:

  • Markdown rendering
  • Pygments syntax highlighting
  • Gravatar support

The container was built on debian slim. Added cgit, nginx, and fcgiwrap.

⁠Quick Start

  1. Clone the repo
  2. Put your bare git repos in a folder named repos/.
  3. Run make up.
  4. Access via http://localhost

⁠Configuration

⁠Repositories

The bare git repositories are located in the /srv/git folder inside the container. This needs to be mounted in the container as a volume.

⁠cgitrc Configuration

A generic, simple cgitrc file (/etc/cgitrc) exists in the container. Provide your own file for customizations.

⁠Cgit locations

cgit is installed in the default locations. Default webroot: /usr/share/cgit Default cgit.cgi: /usr/lib/cgit

⁠General

To customize the web resources, you need to make the changes inside your cgitrc file. A separate folder/volume should be mounted in the container with the files. Ex: res mounted as /usr/share/cgit/res

⁠Docker

⁠Command Line
docker run -d USER/cgit:latest --name cgit -p 80:80 -v repos:/srv/git:ro -v res:/usr/share/cgit/res:ro -v cgitrc:/etc/cgitrc:ro
⁠Compose

An example docker-compose file.

services:
  cgit:
    container_name: cgit
    image: cbinder20/cgit:1.1
    ports:
      - "80:80"
    volumes:
      - repos:/srv/git:ro
      - res:/usr/share/cgit/res:ro
      - cgitrc:/etc/cgitrc:ro
    restart: unless-stopped

Tag summary

Content type

Image

Digest

sha256:05dc05bb9…

Size

127.3 MB

Last updated

6 months ago

docker pull cbinder20/cgit