[object Object]

← back to Dw Vendor Microsites

deploy-vendor: source shared Shopify env into pm2 proc for Memo-Sample checkout

1b95d7cf52fcb229b3e8c13f44110992d35975de · 2026-06-30 16:35:30 -0700 · Steve

Files touched

Diff

commit 1b95d7cf52fcb229b3e8c13f44110992d35975de
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jun 30 16:35:30 2026 -0700

    deploy-vendor: source shared Shopify env into pm2 proc for Memo-Sample checkout
---
 deploy-vendor.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/deploy-vendor.sh b/deploy-vendor.sh
index 599d47a..4d33ac6 100755
--- a/deploy-vendor.sh
+++ b/deploy-vendor.sh
@@ -42,8 +42,14 @@ ssh my-server "bash -s" <<REMOTE
 set -e
 cd ${VDIR_REMOTE}
 pm2 delete ${PM2NAME} 2>/dev/null || true
+# Shared microsite env (Shopify Memo-Sample checkout: SHOPIFY_STORE_DOMAIN /
+# SHOPIFY_STOREFRONT_TOKEN / SHOPIFY_SAMPLE_VARIANT_ID). Fanned out by the
+# secrets skill to /root/Projects/dw-vendor-microsites/.env. Source it so the
+# pm2 proc inherits the Shopify creds; absent file = no-op (button falls back).
+SHARED_ENV=/root/Projects/dw-vendor-microsites/.env
+[ -f "\$SHARED_ENV" ] && set -a && . "\$SHARED_ENV" && set +a
 VENDOR_JSONL=${JSONL_REMOTE} VENDOR_FIELDMAP=${VDIR_REMOTE}/fieldmap.json \
-  pm2 start server.js --name ${PM2NAME} -- ${PORT} ${JSONL_REMOTE} ${VDIR_REMOTE}/fieldmap.json
+  pm2 start server.js --name ${PM2NAME} --update-env -- ${PORT} ${JSONL_REMOTE} ${VDIR_REMOTE}/fieldmap.json
 pm2 save
 sleep 2
 echo "  app health: \$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:${PORT}/)"

← b9cef76 auto-save: 2026-06-30T16:11:45 (1 files) — manifest.json  ·  back to Dw Vendor Microsites  ·  auto-save: 2026-06-30T16:41:53 (1 files) — manifest.json 86e7483 →