Found live: box.bettersight.io's hero image 404'd again after a deploy
that touched zero marketing-related files (a dev.sh/prod.sh/tests-only
commit). Root cause was deeper than the original content-hash fix
assumed — Dokploy re-clones the ENTIRE git checkout on every deploy, not
just ones that change bettersightbox-index.html, which orphans
marketing's assets/ directory bind mount (the container's mount still
points at the old, now-deleted directory inode) whenever the container
itself isn't also recreated in that same deploy. A hash of one file's
content only caught deploys that touched that file.
Fix: generate-dokploy-compose.sh now bakes in the current git commit SHA
instead, so the content-hash label (and the recreate it forces) changes
on every single deploy, unconditionally.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Sightbox marketing page (box.bettersight.io):
- Mobile nav now closes when a menu link is clicked
- Contact form posts to a new backend/billing/contact_lead.py route,
proxied same-origin through the marketing nginx container to
backend-billing, which notifies via Resend
- Hero section now uses assets/building.jpg as its background
Reorganize: bettersightbox-index.html + its nginx config + assets move to
website/website-bettersightbox/, colocated with two new sibling sites:
- website/ (root) — bi.bettersight.io (Bettersight Intelligence)
- website/website-bettersight.io/ — bettersight.io (parent company apex
page), given the same mobile-nav/contact-form treatment as box's page,
sharing website/backend's existing Resend-based /api/contact endpoint
- website/docker-compose.yml's backend service moved off env_file (never
survives Dokploy's AutoDeploy re-clone) onto plain environment: vars,
same fix already proven for backend-billing
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Confirmed the hard way, live in production: Docker Compose only
recreates a container when its own service definition changes (image,
env, labels...), never from a bind-mounted file's content changing on
disk by itself. marketing's service definition never changes between
deploys, so Dokploy's AutoDeploy -- which wipes and re-clones the whole
git checkout, including bettersightbox-index.html, on every push -- had
never once recreated that container. It kept serving a September-dated,
weeks-stale copy of the page indefinitely, orphaned from the fresh file
sitting right next to it on disk, through every single deploy since
Stage 1.
generate-dokploy-compose.sh now computes a real sha256-based hash of
bettersightbox-index.html and bakes it into the marketing service as a
literal content-hash label -- the one value in the whole generated file
that's deliberately NOT left as a live ${VAR} reference, since its only
job is to actually change when the file's content changes, giving
Compose's own diffing a real reason to recreate the container. Local
dev (where this bug doesn't apply, no AutoDeploy wipe-and-reclone cycle)
keeps the ${MARKETING_HTML_HASH:-dev} default.
Documented in CLAUDE.md and CICD_PLAYBOOK.md: regenerate
docker-compose.dokploy.yml any time bettersightbox-index.html changes,
not just when docker-compose.yml itself changes -- skipping it silently
leaves the marketing page stale with no error anywhere.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Propagates this session's permissions-review decision through every doc
that described the old three-persona model: Technician's own Stock User
login is removed entirely (full create/submit/cancel rights with no
restriction tying a transaction to who it's "for" meant nothing stopped
a technician from issuing stock to themselves) in favor of phone-based
reporting through the Dispatcher, who now also raises Material Requests
on a technician's behalf (CLIENT_DEMO_GUIDE.md Stage 4, previously
scripted as the technician logging in and raising it themselves).
Also documents the new Stock Viewer role everywhere the old personas
were: CLAUDE.md's persona table, INSTALLATION_PLAYBOOK.md Stage 8 (now
optional, alongside Dispatcher/Store Manager), and CLIENT_DEMO_GUIDE.md
Stage 7, which no longer demos a Technician "look don't touch" login
(there's no such login anymore) and instead demos the real Stock Viewer
account against the Damage & Cost Report / Serial No Ledger / a
read-only Stock Entry form.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Replaces fully-manual Desk UI click-through for Item Groups/Warehouses/
Items with three fillable CSV templates imported via Frappe's own Data
Import tool (New Data Import -> Insert New Records -> upload -> Start
Import) -- no code, no custom app, consistent with this project's
native-only philosophy.
Headers are not hand-typed or guessed: generated directly from this
exact ERPNext version's own Exporter class (the same code
download_template uses) via bench console against the running instance,
including the Item Reorder child table's "Field Label (Parent Table
Label)" column convention for Reorder Level/Qty -- confirmed by
inspecting Exporter.get_all_exportable_fields' source, since a
child-table key must be the parent's fieldname (reorder_levels), not the
child doctype name (Item Reorder), which silently produces zero columns
if gotten wrong.
Followed up from a user question about cloning a site as a template to
skip reprovisioning -- assessed as unclean (Setup Wizard's company data
can't be cleanly redone on a clone, template would need to stay
permanently free of demo/real data) and recommended templating Stage 6
instead, since it's just data entry, not Frappe system state.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Formalizes the flow now that images are pre-built and pushed rather than
built on the VPS: dev.sh is the fast local iteration loop (build both
custom images for this machine's own architecture, recreate the affected
services, no git/registry involved); prod.sh is the gate before anything
ships (backend test suite must pass, requires a clean main checkout,
rebuilds both images for linux/amd64 and pushes them, then `git push
origin main` to trigger Dokploy's existing AutoDeploy).
Fixes a real bug exposed while wiring prod.sh: erpnext-image/build.sh and
backend/build.sh unconditionally `source` the root .env, whose own active
CUSTOM_IMAGE/CUSTOM_TAG/PULL_POLICY lines would silently clobber any
registry-path override a caller (like prod.sh) exports beforehand —
confirmed the hard way earlier today when a manual override was ignored.
Both scripts now preserve and restore a caller's pre-set values around
that sourcing. Can't fix this by changing .env itself to conditional
defaults, since docker compose reads that same file as plain dotenv, not
bash.
Verified end-to-end: dev.sh built both images and recreated every
affected local service cleanly; prod.sh's guards correctly refused to run
against a dirty working tree; backend's full test suite (98 tests) passes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Confirmed the hard way against a live Dokploy AutoDeploy: the code/
checkout is deleted and re-cloned on every deploy, so backend/.env (an
env_file: mount) never survived to the next deploy. Moved its four values
to plain environment: vars sourced from Dokploy's own Environment tab,
which persists across deploys independent of the git-clone wipe.
Also switches backend-billing to the same build-locally-push-to-registry-
pull pattern already used for erpnext-image, so the Dokploy VPS never
builds anything itself (backend/build.sh) — the user's explicit goal of
making this resilient to future frappe_docker/dependency changes, not
just today's deploy error.
Propagated through docker-compose.yml/.dokploy.yml, .env + .env.example,
CLAUDE.md, INSTALLATION_PLAYBOOK.md, CICD_PLAYBOOK.md, BACKUP_RESTORE.md,
backup.sh/restore.sh, and .gitignore's comments.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Confirmed on a real deploy: Dokploy's own compose validator fails with
"Additional property include is not allowed" before docker compose ever
runs, since it doesn't support the include: directive (open upstream
issues Dokploy/dokploy#3116 and #1727, neither implemented). Added
generate-dokploy-compose.sh to produce a flattened equivalent via
`docker compose config --no-interpolate --no-path-resolution` — both
flags load-bearing, not incidental (see the script's own header comment).
Submodule fetch for frappe_docker (via Dokploy's Enable Submodules toggle)
was confirmed working in the same deploy attempt.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
Native ERPNext/Frappe configuration (provisioning script, playbooks,
demo guides), the backend/ billing service (the one piece of custom
code), erpnext-image branding, backup/restore tooling, and
frappe_docker as a pinned submodule.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y