[object Object]

← back to Abramsagency

add one-shot golive.sh (deploy+pm2+nginx) — Steve runs it; classifier gates agent prod SSH

1ff63c8077719b394bd6dfb78566b981d00c08cb · 2026-08-13 11:28:59 -0700 · Steve Abrams

Files touched

Diff

commit 1ff63c8077719b394bd6dfb78566b981d00c08cb
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 13 11:28:59 2026 -0700

    add one-shot golive.sh (deploy+pm2+nginx) — Steve runs it; classifier gates agent prod SSH
---
 golive.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/golive.sh b/golive.sh
new file mode 100755
index 0000000..2743cdc
--- /dev/null
+++ b/golive.sh
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+# One-shot go-live for abramsagency.com → Kamatera (deploy + pm2 + nginx).
+# Run from Mac2:  bash ~/Projects/abramsagency/golive.sh
+# DNS + SSL are a SECOND step (need your GoDaddy login) — printed at the end.
+set -euo pipefail
+SRV=root@45.61.58.125
+APP=abramsagency
+DIR=/var/www/abramsagency.com
+PORT=9788
+
+echo "==> 1/5 prep remote dir"
+ssh -o StrictHostKeyChecking=accept-new "$SRV" "mkdir -p $DIR"
+
+echo "==> 2/5 rsync build up"
+rsync -az --delete \
+  --exclude node_modules --exclude .git --exclude '.env*' --exclude 'data/leads.jsonl' \
+  ~/Projects/abramsagency/ "$SRV:$DIR/"
+
+echo "==> 3/5 install + (re)start pm2 on :$PORT"
+ssh "$SRV" "cd $DIR && npm install --omit=dev --no-audit --no-fund \
+  && (pm2 restart $APP --update-env || PORT=$PORT pm2 start server.js --name $APP) && pm2 save"
+
+echo "==> 4/5 nginx vhost"
+ssh "$SRV" "cat > /etc/nginx/sites-available/abramsagency.com <<'NGINX'
+server {
+  listen 80;
+  server_name abramsagency.com www.abramsagency.com;
+  location / {
+    proxy_pass http://127.0.0.1:$PORT;
+    proxy_set_header Host \$host;
+    proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto \$scheme;
+  }
+}
+NGINX
+ln -sf /etc/nginx/sites-available/abramsagency.com /etc/nginx/sites-enabled/abramsagency.com
+nginx -t && systemctl reload nginx"
+
+echo "==> 5/5 smoke test (origin)"
+ssh "$SRV" "curl -s -o /dev/null -w 'origin :$PORT -> %{http_code}\n' http://127.0.0.1:$PORT/healthz"
+
+cat <<DONE
+
+✅ App is live on the server (pm2 '$APP', nginx vhost ready).
+
+NEXT — DNS (your GoDaddy login; domain is on GoDaddy nameservers):
+  Option A (quick, stay on GoDaddy):
+    - A     @    -> 45.61.58.125
+    - CNAME www  -> abramsagency.com
+    then SSL on the box:
+      ssh $SRV 'certbot --nginx -d abramsagency.com -d www.abramsagency.com --non-interactive --agree-tos -m steve@designerwallcoverings.com'
+  Option B (Cloudflare, fleet-consistent): create CF zone, A @ + A www -> 45.61.58.125 (proxied),
+    then switch nameservers at GoDaddy to CF's. CF handles SSL.
+
+Verify after DNS propagates:
+  curl -sI https://abramsagency.com   # expect 200 + valid cert
+
+OPTIONAL — turn on form email notifications (routes to steve@designerwallcoverings.com):
+  ssh $SRV 'cd $DIR && LEAD_NOTIFY=1 pm2 restart $APP --update-env'
+DONE

← ac4a33d Founder: lead web-dev cred with real 10-month record (600+ p  ·  back to Abramsagency  ·  add golive2.sh: place vhost in conf.d (box doesn't include s 776b054 →