Commit: e511d07
Parent: a2f21b8

WIP: Nginx+FastCGI Smart HTTP clone

Mårten Åsberg committed on 2025-11-22 at 20:19
GitBrowser.containerfile +0 -0
diff --git a/.containerfile b/GitBrowser.containerfile
similarity index 100%
rename from .containerfile
rename to GitBrowser.containerfile
SmartHttpClone.containerfile +5 -0
diff --git a/SmartHttpClone.containerfile b/SmartHttpClone.containerfile
new file mode 100644
index 0000000..5d9b014
@@ -0,0 +1,5 @@
FROM nginx:1.29.3@sha256:553f64aecdc31b5bf944521731cd70e35da4faed96b2b7548a3d8e2598c52a42
RUN apt-get update && apt-get install -y git
COPY nginx.conf /etc/nginx/nginx.conf
nginx.conf +28 -0
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..aa6f6c5
@@ -0,0 +1,28 @@
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
user root;
events {
worker_connections 1024;
}
http {
server {
listen *:80;
server_name $hostname;
location ~ (^/\w+\.git/.*) {
# Set chunks to unlimited, as the bodies can be huge
client_max_body_size 0;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
include fastcgi_params;
fastcgi_param GIT_HTTP_EXPORT_ALL "0";
fastcgi_param GIT_PROJECT_ROOT /git;
fastcgi_param PATH_INFO $1;
}
}
}