]> Untitled Git - gitweb.git/commitdiff
Version 0.2.0 0.2.0
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Fri, 13 Dec 2024 10:57:56 +0000 (04:57 -0600)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Fri, 13 Dec 2024 10:57:56 +0000 (04:57 -0600)
    * Attempt at fixing reverse proxy base href
    * Generate restful URLs
    * Switched cgi to vanilla alpine

cgi/Dockerfile
docker-compose-prod.yml
docker-compose.yml
gitweb.conf

index 1718c8a9c170bcabbe00b17067c0526b084bde29..740bd009b714733398364055216deea1534a9cf0 100644 (file)
@@ -1,4 +1,4 @@
-FROM nginx:1.27-alpine
+FROM alpine:3.21
 
 RUN apk add --no-cache git git-gitweb fcgiwrap perl-cgi
 
index 57b59bd44744db6d303ebafa3903aaa1387554bf..5f8fe35f12db5b932b0d06ac2f5b87b9800703f4 100644 (file)
@@ -6,7 +6,7 @@ networks:
         driver: overlay
 services:
     web:
-        image: cjpalmer/gitweb:0.1.0
+        image: cjpalmer/gitweb:0.2.0
         volumes:
         - /srv/git:/srv/git:ro
         - ./gitweb.conf:/etc/gitweb.conf
@@ -14,7 +14,9 @@ services:
         - proxy
         - backend
     cgi:
-        image: cjpalmer/gitweb-cgi:0.1.0
+        image: cjpalmer/gitweb-cgi:0.2.0
+        environment:
+        - BASE_URL=https://git.purplebirdman.com/
         volumes:
         - /srv/git:/srv/git:ro
         - ./gitweb.conf:/etc/gitweb.conf
index 373c3aea4f71297ae80150743e53fc128d251779..d3dee016067e5e79e9acae3ab13dcc0812f65335 100644 (file)
@@ -5,7 +5,7 @@ version: '3'
 services:
     web:
         build: web
-        image: cjpalmer/gitweb:0.1.0
+        image: cjpalmer/gitweb:0.2.0
         volumes:
         - /srv/git:/srv/git:ro
         - ./gitweb.conf:/etc/gitweb.conf
@@ -13,7 +13,9 @@ services:
         - 80:80
     cgi:
         build: cgi
-        image: cjpalmer/gitweb-cgi:0.1.0
+        image: cjpalmer/gitweb-cgi:0.2.0
+        environment:
+        - BASE_URL=
         volumes:
         - /srv/git:/srv/git:ro
         - ./gitweb.conf:/etc/gitweb.conf
index c0189ad33f79ebd4856485affa350c98afc1b77d..29c463f39cc1290a072d8c69349d2e6928ee21c5 100644 (file)
@@ -5,26 +5,35 @@ $projectroot = "/srv/git";
 $git_temp = "/tmp";
 
 # target of the home link on top of all pages
-$home_link = $my_uri || "/";
+$home_link = "/";
 
 # html text to include at home page
-$home_text = "indextext.html";
+#$home_text = "indextext.html";
 
 # file with project list; by default, simply scan the projectroot dir.
 $projects_list = $projectroot;
 
 # stylesheet to use
-@stylesheets = ("static/gitweb.css");
+#@stylesheets = ("static/gitweb.css");
 
 # javascript code for gitweb
-$javascript = "static/gitweb.js";
+#$javascript = "static/gitweb.js";
 
 # logo to use
-$logo = "static/git-logo.png";
+#$logo = "static/git-logo.png";
 
 # the 'favicon'
-$favicon = "static/git-favicon.png";
+#$favicon = "static/git-favicon.png";
 
 # git-diff-tree(1) options to use for generated patches
 #@diff_opts = ("-M");
 @diff_opts = ();
+
+# beautiful paths
+$feature{'pathinfo'}{'default'} = [1];
+
+# by default, <base href> is incorrect behind a reverse proxy
+$per_request_config = 1;
+
+$my_uri = "/";
+$base_url = $ENV{BASE_URL};