EBR Electrical - SvelteKit site (diceandmeeple topology): nginx front + SvelteKit/Bun SSR + Hono contact-api
- Svelte 51.2%
- TypeScript 41.9%
- Dockerfile 2.6%
- HTML 2.3%
- CSS 2%
Compose service names become DNS aliases on the shared external 'nginx' network. Generic names (web, web-app, contact-api) collided with diceandmeeple's aliases (dice-meeple-app = web-app; its front proxies /api/ to contact-api), which made thediceandmeeple.com serve EBR's HTML. Unique names remove the collision. container_name stays ebr-wordpress-1 for NPM continuity. |
||
|---|---|---|
| api | ||
| deploy | ||
| src | ||
| static | ||
| .dockerignore | ||
| .gitignore | ||
| bun.lock | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
EBR Electrical — ebrelectrical.co.uk
SvelteKit rewrite of the EBR Electrical WordPress site, following the diceandmeeple structure and deployment topology.
Topology (Portainer stack ebr on nagata)
NPM (proxy_hosts 3 & 9) -> ebr-wordpress-1 (nginx front, name kept for NPM)
├── /api/ -> ebr-contact-api (Hono + ALTCHA + nodemailer)
└── / -> ebr-web-app (SvelteKit/Bun SSR, prerendered)
All three containers live on the external nginx network. The old WordPress
container is kept stopped as ebr-wordpress-1-old (data dir
/opt/docker/data/ebr) for rollback.
Layout
src/— SvelteKit 5 (runes) + Tailwind 4,adapter-node, all routes prerenderedstatic/gallery/— 56 work photos (original FooGallery order) +thumbs/api/— contact-api: ALTCHA proof-of-work, honeypot, per-IP rate limits, owner notification + sender confirmation via SMTPdeploy/— nginx front image + configdocker-compose.yaml— the live stack (images built locally on nagata:ebr:local,ebr-nginx:local,ebr-api:local)
Contact form / mailer
The form is disabled (503 form_disabled) until SMTP credentials are set in
the stack env (~/ebr-build/.env on nagata):
SMTP_HOST= SMTP_PORT=587 SMTP_USER= SMTP_PASS=
ALTCHA_HMAC_KEY=*** hex 32, generated on first deploy>
CONTACT_TO=business@feliziani.me
CONTACT_FROM=EBR Electrical <Niall@ebrelectrical.co.uk>
Then docker compose --env-file .env up -d to enable it.
Develop
bun install
bun run dev # vite dev
bun run build # -> build/ (node build/index.js)