--- /dev/null
+VPS_HOST=dev.nutra.tk
+VPS_USER=gg
.SHELL := /bin/bash
# .ONESHELL:
+ifneq (,$(wildcard ./.env))
+ include .env
+ export
+endif
+
VPS_HOST ?= dev.nutra.tk
VPS_USER ?= gg
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
--- /dev/null
+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
--- /dev/null
+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;
+ }
+}
--- /dev/null
+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