From: Clifton Palmer Date: Fri, 13 Dec 2024 10:57:56 +0000 (-0600) Subject: Version 0.2.0 X-Git-Tag: 0.2.0 X-Git-Url: http://git.purplebirdman.com/gitweb.git/commitdiff_plain/f666ef81068b323fb5c67be4febfba767a495f81?ds=inline Version 0.2.0 * Attempt at fixing reverse proxy base href * Generate restful URLs * Switched cgi to vanilla alpine --- diff --git a/cgi/Dockerfile b/cgi/Dockerfile index 1718c8a..740bd00 100644 --- a/cgi/Dockerfile +++ b/cgi/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.27-alpine +FROM alpine:3.21 RUN apk add --no-cache git git-gitweb fcgiwrap perl-cgi diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 57b59bd..5f8fe35 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 373c3ae..d3dee01 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/gitweb.conf b/gitweb.conf index c0189ad..29c463f 100644 --- a/gitweb.conf +++ b/gitweb.conf @@ -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, is incorrect behind a reverse proxy +$per_request_config = 1; + +$my_uri = "/"; +$base_url = $ENV{BASE_URL};