aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShy <[email protected]>2025-12-20 13:26:32 -0500
committerShy <[email protected]>2025-12-20 13:26:32 -0500
commit5f6237538cb391bd69a75d90f93405306b6b880d (patch)
tree5485b48a9bd007b7e53c7d08ba2efcd6c107151d
parentce0ab30b5066664ff4688f6bf70ce60c9f858bc2 (diff)
downloadalpine-cgit-5f6237538cb391bd69a75d90f93405306b6b880d.tar.xz
alpine-cgit-5f6237538cb391bd69a75d90f93405306b6b880d.zip
Add http clone
-rw-r--r--.idea/.gitignore8
-rw-r--r--Dockerfile1
-rw-r--r--nginx/conf.d/default.conf13
3 files changed, 22 insertions, 0 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/Dockerfile b/Dockerfile
index 70dc1b4..e822831 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,6 +24,7 @@ RUN set -eux \
cgit=${CGIT_VERSION} \
fcgiwrap \
git \
+ git-daemon \
lua5.3-libs \
py3-markdown \
py3-pygments \
diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf
index 8ee8bcc..b991022 100644
--- a/nginx/conf.d/default.conf
+++ b/nginx/conf.d/default.conf
@@ -12,6 +12,19 @@ server {
expires 30d;
}
+ location ~ /.+/(info/refs|git-upload-pack) {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param GIT_HTTP_EXPORT_ALL 1;
+ fastcgi_param GIT_PROJECT_ROOT /srv/git;
+ fastcgi_param GIT_CONFIG_COUNT 1;
+ fastcgi_param GIT_CONFIG_KEY_0 safe.directory;
+ fastcgi_param GIT_CONFIG_VALUE_0 *;
+ fastcgi_param HOME /srv/git;
+ fastcgi_pass unix:/var/run/fcgiwrap.sock;
+ }
+
location @cgit {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi;