← back to Tools Dw Hub
start-fleet.sh: keep the curated 13-tool set always-on via pm2 (secrets injected at spawn, taggers DRY_RUN, pm2 save reboot-safe) — makes the public hub actually launchable
ae319d641cdb1e63dd974af14cfddce535c011c8 · 2026-07-28 15:29:27 -0700 · Steve
Files touched
Diff
commit ae319d641cdb1e63dd974af14cfddce535c011c8
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 28 15:29:27 2026 -0700
start-fleet.sh: keep the curated 13-tool set always-on via pm2 (secrets injected at spawn, taggers DRY_RUN, pm2 save reboot-safe) — makes the public hub actually launchable
---
start-fleet.sh | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/start-fleet.sh b/start-fleet.sh
new file mode 100755
index 0000000..86caf6d
--- /dev/null
+++ b/start-fleet.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+# Keep the curated DW tool set always-on via pm2 on Mac2 (TK-10024).
+# Reads tools.json for the start command + port of each curated slug, injects secrets
+# from secrets-manager at spawn (never written anywhere), and pm2-manages each so they
+# survive reboot. Taggers run DRY_RUN=1 (no Shopify writes from the always-on instance).
+set -u
+cd "$(dirname "$0")"
+
+# curated set: the 4 groups Steve picked (named + taggers + dashboards + room tools)
+CURATED=(150dpi recolor-v14 color-wheel \
+ tagger-kravet tagger-thibaut tagger-pr \
+ vendor-dashboard-v2 pm2-dashboard system-dashboard calendar master-listings \
+ image-to-room room-setting-app)
+
+# secrets → exported env (pm2 captures the spawn env)
+SECRETS="$HOME/Projects/secrets-manager/.env"
+export GEMINI_API_KEY=$(grep -hoE '^GEMINI_API_KEY=.*' "$SECRETS" | head -1 | cut -d= -f2- | tr -d '"'"'"' \r')
+export SHOPIFY_ADMIN_TOKEN=$(grep -hoE '^SHOPIFY_ADMIN_TOKEN=.*' "$SECRETS" | head -1 | cut -d= -f2- | tr -d '"'"'"' \r')
+export SHOPIFY_ADMIN_ACCESS_TOKEN="$SHOPIFY_ADMIN_TOKEN"
+export ADMIN_PASSWORD="DW2024!"
+export DRY_RUN=1
+export VISION_SCAN_CAP=25
+
+for slug in "${CURATED[@]}"; do
+ read -r PORT START < <(node -e "
+ const t=JSON.parse(require('fs').readFileSync('tools.json','utf8')).tools.find(x=>x.slug==='$slug');
+ if(!t){process.exit(0)} console.log((t.port||''), (t.start||'').replace(/\n/g,' '));" | sed 's/ / /')
+ START=$(node -e "const t=JSON.parse(require('fs').readFileSync('tools.json','utf8')).tools.find(x=>x.slug==='$slug');process.stdout.write(t?t.start:'')")
+ PORT=$(node -e "const t=JSON.parse(require('fs').readFileSync('tools.json','utf8')).tools.find(x=>x.slug==='$slug');process.stdout.write(t&&t.port?String(t.port):'')")
+ [ -z "$START" ] && { echo "SKIP $slug (no start)"; continue; }
+ NAME="dwtool-$slug"
+ [ -n "$PORT" ] && export NEXTAUTH_URL="http://localhost:$PORT"
+ pm2 delete "$NAME" >/dev/null 2>&1
+ PORT="$PORT" pm2 start bash --name "$NAME" --update-env -- -lc "$START" >/dev/null 2>&1 \
+ && echo "started $NAME (port ${PORT:-n/a})" || echo "FAILED $NAME"
+done
+
+pm2 save >/dev/null 2>&1
+echo "--- fleet pm2 roster ---"
+pm2 ls | grep dwtool- || true
← 94b2c2b start/stop from the hub: local mode spawns manifest start-co
·
back to Tools Dw Hub
·
start-fleet: inject DW_BASIC_AUTH so room-setting-app passwo 080da47 →