~saiko/docker-cgit

8f9550fad9fa767d9c76b5ba9a5e90280cf01164 — therealfarfetchd 1 year, 13 days ago bf5ec10 master
smart http & better logos
M build/fcgi/Dockerfile => build/fcgi/Dockerfile +1 -1
@@ 2,6 2,6 @@ FROM alpine:edge

RUN \
  apk upgrade --no-cache && \
  apk add --no-cache cgit git fcgiwrap py3-pygments py3-markdown py3-docutils
  apk add --no-cache cgit git git-daemon fcgiwrap py3-pygments py3-markdown py3-docutils

ENTRYPOINT /usr/bin/fcgiwrap -s tcp:0.0.0.0:9000

M data/cgitrc => data/cgitrc +3 -2
@@ 3,13 3,14 @@
#

css=/cgit.css
logo=/cgit.png
#logo=/cgit.png
logo=/res/logo.png

root-title=therealfarfetchd's git repository
root-desc=you want source code, you get source code

# Allow http transport git clone
enable-http-clone=1
# enable-http-clone=1
clone-url=git@git.therealfarfetchd.dev:$CGIT_REPO_URL https://$HTTP_HOST/$CGIT_REPO_URL

# if you do not want that webcrawler (like google) index your site

M data/conf/default.conf => data/conf/default.conf +21 -4
@@ 4,12 4,29 @@ server {
    root /usr/share/webapps/cgit;
    try_files $uri @cgit;

    location /favicon.ico {
        root /res;
    }

    location /res {
        root /;
    }

    location ~* .git/(HEAD|info/refs|git-(upload|receive)-pack) {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME     /usr/libexec/git-core/git-http-backend;
        fastcgi_param GIT_HTTP_EXPORT_ALL "";
        fastcgi_param GIT_PROJECT_ROOT    /srv/git;
        fastcgi_param PATH_INFO           $uri;
        fastcgi_pass fcgi:9000;
    }

    location @cgit {
        include fastcgi_params;
        fastcgi_param       SCRIPT_FILENAME $document_root/cgit.cgi;
        fastcgi_param       PATH_INFO       $uri;
        fastcgi_param       QUERY_STRING    $args;
        fastcgi_param       HTTP_HOST       $server_name;
        fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi;
        fastcgi_param PATH_INFO       $uri;
        fastcgi_param QUERY_STRING    $args;
        fastcgi_param HTTP_HOST       $server_name;
        fastcgi_pass fcgi:9000;
    }
}

A data/res/favicon.ico => data/res/favicon.ico +0 -0

A data/res/logo.png => data/res/logo.png +0 -0

M docker-compose.yml => docker-compose.yml +1 -0
@@ 4,6 4,7 @@ services:
    image: nginx
    volumes:
      - ./data/conf:/etc/nginx/conf.d
      - ./data/res:/res
      - cgit:/usr/share/webapps/cgit
    networks:
      internal: