Merge remote-tracking branch 'origin/dev-vps16-ubu22.04' into dev-vps16-ubu22.04
authorShane Jaroch <chown_tee@proton.me>
Fri, 16 Jan 2026 03:18:09 +0000 (22:18 -0500)
committerShane Jaroch <chown_tee@proton.me>
Fri, 16 Jan 2026 03:18:09 +0000 (22:18 -0500)
1  2 
Makefile

diff --cc Makefile
index 0c0757c25954763f64324f3cf10df1bcdc997ad9,dfe33aed1f6474838ada54e045772011d6fbb724..3b3e3ac95532d1626de559600cb372972fea8ba0
+++ b/Makefile
@@@ -64,8 -60,28 +64,28 @@@ deploy/nginx: stage/nginx test/nginx di
  .PHONY: test/nginx
  test/nginx: ##H @Remote Test staged configuration without deploying
        @echo "Testing staged config on $(VPS_HOST)..."
 -      ssh -t $(VPS) "bash ~/.nginx-staging/deploy.sh test"
 +      ssh -t $(VPS) "bash ~/.nginx-staging/scripts/deploy.sh test"
  
+ .PHONY: deploy/klaus
+ deploy/klaus: ##H @Remote Deploy Klaus (systemd + nginx) and install deps
+       @echo "Uploading deployment bundle..."
+       tar cz -C etc/systemd/system klaus.service -C ../../nginx/conf.d klaus.conf -C ../../../scripts klaus_app.py | ssh $(VPS) "cat > /tmp/klaus-deploy.tgz"
+       @echo "Installing on $(VPS_HOST)..."
+       ssh -t $(VPS) "cd /tmp && tar xz -f klaus-deploy.tgz && \
+               sudo bash -c '# apt-get update && apt-get install -y universal-ctags && \
+               pip3 install klaus gunicorn markdown && \
+               mv klaus_app.py /usr/local/bin/klaus_app.py && \
+               mv klaus.service /etc/systemd/system/klaus.service && \
+               systemctl daemon-reload && \
+               systemctl enable --now klaus && \
+               systemctl restart klaus && \
+               mv /etc/nginx/conf.d/git-http.conf /etc/nginx/conf.d/git-http.conf.disabled 2>/dev/null || true && \
+               mv klaus.conf /etc/nginx/conf.d/klaus.conf && \
+               nginx -t && \
+               systemctl reload nginx' && \
+               rm klaus-deploy.tgz"
+       @echo "Klaus deployed!"
  .PHONY: certbot/nginx
  certbot/nginx: ##H @Remote Run certbot on remote VPS
        @echo "Running certbot on $(VPS_HOST)..."