From 91690b59663b89bbc3d8c7febe2b046de1424672 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 7 Mar 2025 19:15:31 +0800 Subject: fix(git): public/private repo problem, enable cgit for private. --- services/templates/cgit/cgitrc.template | 26 +++++++++++++++++++++++++ services/templates/cgit/private-list | 1 + services/templates/cgitrc.template | 21 -------------------- services/templates/docker-compose.yaml.template | 2 +- 4 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 services/templates/cgit/cgitrc.template create mode 100644 services/templates/cgit/private-list delete mode 100644 services/templates/cgitrc.template (limited to 'services/templates') diff --git a/services/templates/cgit/cgitrc.template b/services/templates/cgit/cgitrc.template new file mode 100644 index 0000000..ed581bd --- /dev/null +++ b/services/templates/cgit/cgitrc.template @@ -0,0 +1,26 @@ +css=/git/static/cgit.css +logo=/git/static/cgit.png +root-title=crupest Git Repos +source-filter=/usr/lib/cgit/filters/syntax-highlighting.py +about-filter=/usr/lib/cgit/filters/about-formatting.sh + +enable-http-clone=0 +enable-commit-graph=1 +enable-index-links=1 +enable-index-owner=0 +enable-log-filecount=1 +enable-log-linecount=1 +enable-git-config=1 +snapshots=tar.gz tar.bz2 zip + +readme=:README.md +readme=:README + +clone-prefix=@@CRUPEST_ROOT_URL@@git +section-from-path=1 +scan-path=/git/repos/public + +strict-export=cgit-export +section-from-path=-1 +project-list=/app/cgit/private-list +scan-path=/git/repos diff --git a/services/templates/cgit/private-list b/services/templates/cgit/private-list new file mode 100644 index 0000000..c8c6761 --- /dev/null +++ b/services/templates/cgit/private-list @@ -0,0 +1 @@ +private \ No newline at end of file diff --git a/services/templates/cgitrc.template b/services/templates/cgitrc.template deleted file mode 100644 index 45ee262..0000000 --- a/services/templates/cgitrc.template +++ /dev/null @@ -1,21 +0,0 @@ -css=/git/static/cgit.css -logo=/git/static/cgit.png -root-title=crupest Git Repos -source-filter=/usr/lib/cgit/filters/syntax-highlighting.py -about-filter=/usr/lib/cgit/filters/about-formatting.sh - -enable-http-clone=0 -enable-commit-graph=1 -enable-index-links=1 -enable-index-owner=0 -enable-log-filecount=1 -enable-log-linecount=1 -enable-git-config=1 -snapshots=tar.gz tar.bz2 zip - -readme=:README.md -readme=:README - -clone-prefix=@@CRUPEST_ROOT_URL@@git/ -section-from-path=1 -scan-path=/git/repos/public diff --git a/services/templates/docker-compose.yaml.template b/services/templates/docker-compose.yaml.template index 3523023..842037b 100644 --- a/services/templates/docker-compose.yaml.template +++ b/services/templates/docker-compose.yaml.template @@ -84,7 +84,7 @@ services: hostname: git-server volumes: - "./@@CRUPEST_DATA_GIT_DIR@@:/git" - - "./@@CRUPEST_GENERATED_DIR@@/cgitrc:/etc/cgitrc:ro" + - "./@@CRUPEST_GENERATED_DIR@@/cgit:/app/cgit" restart: on-failure:3 roundcubemail: -- cgit v1.2.3