From: Shane Date: Sun, 11 Jan 2026 00:58:18 +0000 (+0000) Subject: commit more X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=aa53fda3c3a04025244a894c2f53e5dc7b773beb;p=nutratech%2Fvps-root.git commit more --- diff --git a/Makefile b/Makefile index 719f17b..3b3e6ff 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,8 @@ ifdef SUDO_USER echo "secrets.conf is ENCRYPTED, skipping."; \ rm -f /tmp/nginx-staging/secrets.conf; \ fi + # Copy gitweb.conf if it exists + [ -f etc/gitweb.conf ] && cp etc/gitweb.conf /tmp/nginx-staging/ cp scripts/deploy.sh /tmp/nginx-staging/ chmod -R a+rX /tmp/nginx-staging else diff --git a/etc/gitweb.conf b/etc/gitweb.conf new file mode 100644 index 0000000..9559e09 --- /dev/null +++ b/etc/gitweb.conf @@ -0,0 +1,31 @@ +# path to git projects (.git) +$projectroot = "/srv/git"; + +# directory to use for temp files +$git_temp = "/tmp"; + +# target of the home link on top of all pages +$home_link = $my_uri || "/"; + +# html text to include at home page +$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"); + +# javascript code for gitweb +$javascript = "static/gitweb.js"; + +# logo to use +$logo = "/static/git-logo.png"; + +# the 'favicon' +$favicon = "/static/git-favicon.png"; + +# git-diff-tree(1) options to use for generated patches +#@diff_opts = ("-M"); + +@diff_opts = ("-M", "-C"); diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d1c213c..89a5f26 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -63,6 +63,15 @@ fi if sudo nginx -t; then echo "Configuration is valid. Reloading Nginx..." sudo nginx -s reload + + # Deploy gitweb.conf if it exists in staging + if [ -f "$STAGING_DIR/gitweb.conf" ]; then + echo "Deploying gitweb.conf..." + # Backup existing + [ -f /etc/gitweb.conf ] && sudo cp /etc/gitweb.conf $BACKUP_DIR/gitweb.conf + sudo cp "$STAGING_DIR/gitweb.conf" /etc/gitweb.conf + fi + echo "✓ Deployment successful." else echo "✗ Configuration failed validation! Rolling back..."