[object Object]

← back to La Socrata Ingester

Deploy: buildingpermits.agentabrams.com public via Cloudflare Tunnel (pm2 + DEPLOY.md)

fa5796cabf0459fd404a9b7d1478d736e3af8708 · 2026-08-11 12:13:14 -0700 · steve

Files touched

Diff

commit fa5796cabf0459fd404a9b7d1478d736e3af8708
Author: steve <steve@designerwallcoverings.com>
Date:   Tue Aug 11 12:13:14 2026 -0700

    Deploy: buildingpermits.agentabrams.com public via Cloudflare Tunnel (pm2 + DEPLOY.md)
---
 viewer/DEPLOY.md     | 21 +++++++++++++++++++++
 viewer/run-public.sh |  4 ++++
 2 files changed, 25 insertions(+)

diff --git a/viewer/DEPLOY.md b/viewer/DEPLOY.md
new file mode 100644
index 0000000..66d6afd
--- /dev/null
+++ b/viewer/DEPLOY.md
@@ -0,0 +1,21 @@
+# buildingpermits.agentabrams.com — deploy
+
+PUBLIC viewer of LA building permits (public data), served off Mac2 via Cloudflare Tunnel.
+
+## Topology
+buildingpermits.agentabrams.com  -> Cloudflare (proxied CNAME -> <tunnel>.cfargotunnel.com)
+  -> cloudflared tunnel `buildingpermits` (id f267f183-a221-467f-905a-449698bff870)
+  -> http://127.0.0.1:9873  (pm2 `buildingpermits-viewer`, VIEWER_NO_AUTH=1, reads local realestate DB)
+
+## pm2 processes (Mac2)
+- `buildingpermits-viewer`  -> viewer/run-public.sh (node server.js, port 9873, no auth = public)
+- `buildingpermits-tunnel`  -> cloudflared tunnel run buildingpermits (config ~/.cloudflared/buildingpermits.yml)
+Both pm2-saved. Internal auth copy still runs on 9814 (admin/DW2024!).
+
+## Change the app
+Edit viewer/ then `pm2 restart buildingpermits-viewer`. Tunnel needs no restart.
+
+## Notes
+- CNAME lives in the agentabrams.com CF zone (id 0121a01d). Proxied (orange) is required.
+- One extra CNAME under the DW zone was auto-created by cloudflared route dns (cert only auths
+  the DW zone); it is inert and Steve can prune it later.
diff --git a/viewer/run-public.sh b/viewer/run-public.sh
new file mode 100755
index 0000000..fbd46ec
--- /dev/null
+++ b/viewer/run-public.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd "$(dirname "$0")"
+export PERMIT_VIEWER_PORT=9873 VIEWER_NO_AUTH=1 REALESTATE_DB=realestate
+exec node server.js

← ff21d5c Viewer: List/Grid/Map views + color-ID + shareable ?view=&co  ·  back to La Socrata Ingester  ·  viewer: add source-attribution + as-is/no-endorsement compli 6f64d55 →