← back to All Designerwallcoverings

.deploy.conf

32 lines

# ============================================================================
# DEPLOY GUARDRAIL — READ BEFORE DEPLOYING THIS REPO
# ============================================================================
# DO NOT use the full-tree /deploy skill (~/Projects/_shared/scripts/deploy.sh,
# which runs `rsync -az --delete`) on this repo. The full-tree --delete is UNSAFE
# here.
#
# WHY: prod generates its OWN live artifacts that do NOT exist locally —
#   data/microsites.json  (written by the microsite crawler every 10 min)
#   data/vendors.json     (live-crawl artifact)
# plus prod-only backup files. A full-tree `rsync --delete` would overwrite these
# with stale local copies OR delete them outright, taking down /api/microsites and
# the live directory.
#
# CORRECT METHOD — TARGETED single-file rsync of ONLY the changed file(s):
#   1) rsync just the file(s) you changed to prod:
#      rsync -avz public/index.html root@45.61.58.125:/root/Projects/all-designerwallcoverings/public/index.html
#   2) reload + persist pm2:
#      ssh root@45.61.58.125 'pm2 reload all-designerwallcoverings && pm2 save'
#   3) smoke-test:
#      - /healthz should return 200:
#        curl -s -o /dev/null -w '%{http_code}' http://45.61.58.125:9958/healthz   # expect 200
#      - public root should return 401 (the HEALTHY gated signal, NOT an outage):
#        curl -s -o /dev/null -w '%{http_code}' https://all.designerwallcoverings.com/   # expect 401
#
# See the "## Deploy" section of this repo's CLAUDE.md for the same note.
# Deploy to this public, gated surface is Steve-gated — build+stage, then ask.
# ============================================================================
PROJECT_NAME=all-designerwallcoverings
DEPLOY_PATH=/root/Projects/all-designerwallcoverings
HEALTH_URL=http://127.0.0.1:9958/healthz