update with git-http.conf and dns-records.csv
authorShane <chown_tee@proton.me>
Sun, 11 Jan 2026 00:15:36 +0000 (00:15 +0000)
committerShane <chown_tee@proton.me>
Sun, 11 Jan 2026 00:16:20 +0000 (00:16 +0000)
.env [new file with mode: 0644]
Makefile
dns-records.csv [new file with mode: 0644]
etc/nginx/conf.d/git-http.conf [new file with mode: 0644]
scripts/dns-records.csv [new file with mode: 0644]

diff --git a/.env b/.env
new file mode 100644 (file)
index 0000000..64ff8ba
--- /dev/null
+++ b/.env
@@ -0,0 +1,2 @@
+VPS_HOST=dev.nutra.tk
+VPS_USER=gg
index 811c9adb440c06c918934e0c7e720543c0627bfd..b9fc6ee4e54a4a4ecf0936c5395bd331725c2e69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,11 @@
 .SHELL := /bin/bash
 # .ONESHELL:
 
+ifneq (,$(wildcard ./.env))
+    include .env
+    export
+endif
+
 VPS_HOST ?= dev.nutra.tk
 VPS_USER ?= gg
 
@@ -20,3 +25,20 @@ diff/nginx:
 deploy/nginx:
        @echo "Deploying checked-in nginx config to $(VPS_HOST)..."
        ssh -t $(VPS_USER)@$(VPS_HOST) "bash ~/nginx-staging/deploy.sh"
+
+.PHONY: stage/local
+stage/local:
+       @echo "Staging files locally..."
+       rm -rf ~/nginx-staging && mkdir -p ~/nginx-staging
+       cp -r etc/nginx/conf.d/*.conf ~/nginx-staging/
+       cp scripts/deploy.sh ~/nginx-staging/
+
+.PHONY: diff/local
+diff/local: stage/local
+       @echo "Checking diff locally..."
+       bash ~/nginx-staging/deploy.sh diff
+
+.PHONY: deploy/local
+deploy/local: stage/local
+       @echo "Deploying locally..."
+       bash ~/nginx-staging/deploy.sh
diff --git a/dns-records.csv b/dns-records.csv
new file mode 100644 (file)
index 0000000..b9ed3b4
--- /dev/null
@@ -0,0 +1,17 @@
+Name,Type,TTL,Target
+,A,3600,216.218.216.163
+API,A,3600,216.218.216.163
+API-DEV,A,3600,216.218.228.93
+API.DEV,A,3600,216.218.228.93
+CHAT,A,3600,216.218.228.93
+DEV,A,3600,216.218.228.93
+GIT,A,3600,216.218.228.93
+MATRIX,A,3600,216.218.228.93
+S3,A,3600,216.218.228.93
+S3-ADMIN,A,3600,216.218.228.93
+STORE,A,3600,216.218.228.93
+STORE-ADMIN-8B56411B,A,3600,216.218.228.93
+STORE-API,A,3600,216.218.228.93
+WWW,A,3600,216.218.216.163
+WWW.DEV,A,3600,216.218.228.93
+,TXT,3600,google-site-verification=kxGS8ZR9OjzDU8gXJoXOYZ5CdVSpfZkgEHxdsQIOwf0
diff --git a/etc/nginx/conf.d/git-http.conf b/etc/nginx/conf.d/git-http.conf
new file mode 100644 (file)
index 0000000..a61ff48
--- /dev/null
@@ -0,0 +1,23 @@
+server {
+    listen 80;
+    server_name git.nutra.tk;
+
+    # Define the root directory for non-Git content (optional)
+    root /var/www/html;
+    index index.html;
+
+    # Directory for Git repositories
+    set $git_root /srv/git;
+
+    # Serve Git repositories under /git/
+    location ~ ^/git/([^/]+\.git)(/.*)?$ {
+        include fastcgi_params;
+        fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
+        fastcgi_param GIT_PROJECT_ROOT $git_root;
+        fastcgi_param GIT_HTTP_EXPORT_ALL "1"; # Allow access without git-daemon-export-ok
+        fastcgi_param PATH_INFO /$1$2; # Repo name + subpath (e.g., /myrepo.git/info/refs)
+        fastcgi_param REQUEST_METHOD $request_method;
+        fastcgi_param QUERY_STRING $query_string;
+        fastcgi_pass unix:/var/run/fcgiwrap.socket;
+    }
+}
diff --git a/scripts/dns-records.csv b/scripts/dns-records.csv
new file mode 100644 (file)
index 0000000..7da5614
--- /dev/null
@@ -0,0 +1,17 @@
+Name,Type,TTL,Target
+@,A,3600,216.218.216.163
+API,A,3600,216.218.216.163
+API-DEV,A,3600,216.218.228.93
+API.DEV,A,3600,216.218.228.93
+CHAT,A,3600,216.218.228.93
+DEV,A,3600,216.218.228.93
+GIT,A,3600,216.218.228.93
+MATRIX,A,3600,216.218.228.93
+S3,A,3600,216.218.228.93
+S3-ADMIN,A,3600,216.218.228.93
+STORE,A,3600,216.218.228.93
+STORE-ADMIN-8B56411B,A,3600,216.218.228.93
+STORE-API,A,3600,216.218.228.93
+WWW,A,3600,216.218.216.163
+WWW.DEV,A,3600,216.218.228.93
+@,TXT,3600,google-site-verification=kxGS8ZR9OjzDU8gXJoXOYZ5CdVSpfZkgEHxdsQIOwf0