sightbox/website
JasonFraser d22b628945 Bring website/ into the dev/prod workflow: local bring-up + a real test suite
dev.sh now also brings up website/'s own stack (bi.bettersight.io,
bettersight.io, shared backend) via its own docker compose up -d --build,
and force-recreates marketing locally too — its content-hash label never
changes on a plain local `up -d` the way generate-dokploy-compose.sh
makes it change for Dokploy, so local edits to bettersightbox-index.html
were silently not picked up either without this.

website/backend gets a real test suite (17 tests: contact form
validation/success/failure, both calculator endpoints, and build_pdf()
exercised for real since it's pure/offline) — previously completely
untested. prod.sh now gates the ship on both test suites passing, since
one git push now triggers both Dokploy apps' AutoDeploy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
2026-10-04 17:49:48 -04:00
..
assets Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
backend Bring website/ into the dev/prod workflow: local bring-up + a real test suite 2026-10-04 17:49:48 -04:00
website-bettersight.io Add node-network visual to bettersight.io's hero 2026-10-04 17:38:41 -04:00
website-bettersightbox Group box.bettersight.io's footer Product/Company columns together 2026-10-04 17:36:12 -04:00
.dockerignore Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
.env.example Rename website/backend's sender name default to "Bettersight" 2026-10-04 16:38:26 -04:00
Dockerfile Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
README.md Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
bettersight-calculator.html Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
docker-compose.yml Rename website/backend's sender name default to "Bettersight" 2026-10-04 16:38:26 -04:00
index.html Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00
nginx.conf Add Resend contact-form wiring, hero image, mobile-nav fix; add website/ (bi.bettersight.io + bettersight.io) 2026-10-04 16:06:56 -04:00

README.md

website/ — bi.bettersight.io + bettersight.io

Two marketing/company sites, unrelated to the Sightbox/ERPNext product one level up — co-located in this repo only for convenience (shared Gitea repo, shared Dokploy server). Deployed as a separate Dokploy Compose application from the ERPNext stack, same repo, different Compose Path.

Site Folder What it is
bi.bettersight.io index.html / assets/ (this dir) Bettersight Intelligence — the AI/RAG product
bettersight.io website-bettersight.io/ The parent company's own apex page
box.bettersight.io website-bettersightbox/ Sightbox's marketing page — stays part of the ERPNext Dokploy app (its marketing service, one level up), not this one

Both sites here share one Flask backend service (/api/contact, Resend-based) — one Resend account, one sales inbox, for both sites' contact forms. See docker-compose.yml's own header comment for why.

Local dev

docker compose -f website/docker-compose.yml up -d --build

Copy .env.example to .env in this directory and fill in RESEND_API_KEY to actually test email delivery — left blank, /api/contact returns a visible 502 to the caller (this backend surfaces send failures rather than swallowing them; see backend/services/email_service.py).

Deploying (Dokploy)

  1. New Compose application in Dokploy, same Gitea repo as the ERPNext app (git.bettertend.net/JasonFraser/sightbox.git), but a separate application — Compose Path: website/docker-compose.yml. Unlike the ERPNext app, this file has no include: directive, so it does not need generate-dokploy-compose.sh — Dokploy can build straight from it.
  2. Environment tab, set for real: RESEND_API_KEY, MAIL_SENDER_NAME, MAIL_SENDER_ADDRESS, SALES_EMAIL, SITE_BASE_URL, RATELIMIT_PER_HOUR. (Not env_file: — Dokploy wipes and re-clones the git checkout on every AutoDeploy, so a file living in the checkout never survives; see docker-compose.yml's own comment.)
  3. Domains: assign bi.bettersight.io to the website service (port 80) and bettersight.io to the website-bettersight-io service (port 80), both in Dokploy's own UI — no Traefik labels are hardcoded here, same as the ERPNext app's marketing service.
  4. DNS: A records for both domains → the Dokploy server's IP (same one box.bettersight.io already points at).
  5. Enable AutoDeploy on this new application, same as the existing ERPNext one.

Editing bettersight.io's apex page

website-bettersight.io/bettersight.io-index.html has its own mobile nav (<details class="nav-toggle">) and contact form — same pattern as website-bettersightbox/bettersightbox-index.html. No content-hash / AutoDeploy-staleness mechanism is needed here, unlike that sibling: this page's container isn't sitting behind the ERPNext app's long-lived marketing service pattern — a plain Dokploy redeploy picks up file changes normally since the image is rebuilt from source on every deploy.