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 |
||
|---|---|---|
| .. | ||
| assets | ||
| backend | ||
| website-bettersight.io | ||
| website-bettersightbox | ||
| .dockerignore | ||
| .env.example | ||
| Dockerfile | ||
| README.md | ||
| bettersight-calculator.html | ||
| docker-compose.yml | ||
| index.html | ||
| nginx.conf | ||
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
- bi.bettersight.io → http://localhost:8082
- bettersight.io → http://localhost:8084
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)
- 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 noinclude:directive, so it does not needgenerate-dokploy-compose.sh— Dokploy can build straight from it. - Environment tab, set for real:
RESEND_API_KEY,MAIL_SENDER_NAME,MAIL_SENDER_ADDRESS,SALES_EMAIL,SITE_BASE_URL,RATELIMIT_PER_HOUR. (Notenv_file:— Dokploy wipes and re-clones the git checkout on every AutoDeploy, so a file living in the checkout never survives; seedocker-compose.yml's own comment.) - Domains: assign
bi.bettersight.ioto thewebsiteservice (port 80) andbettersight.ioto thewebsite-bettersight-ioservice (port 80), both in Dokploy's own UI — no Traefik labels are hardcoded here, same as the ERPNext app'smarketingservice. - DNS: A records for both domains → the Dokploy server's IP (same one
box.bettersight.ioalready points at). - 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.