Skip to content

Deployment and PWA

SamsterZero edited this page Aug 14, 2026 · 4 revisions

Deployment and PWA

Current static deployment

bun install --frozen-lockfile
bun run build

Serve build/ over HTTPS. For the official GitHub Pages path, build with DEPLOY_TARGET=github-pages. The Dockerfile builds with Bun and serves the static output through nginx:

docker build -t granthalay:local .
docker run --rm -p 8080:80 granthalay:local

The web manifest is generated from SvelteKit's configured base path, and the service worker derives that base from its deployed URL. bun run verify:build checks both root hosting and the official /Granthalay/ GitHub Pages path, including manifest links and offline fallbacks.

Future backend deployment

The PWA remains a static GitHub Pages deployment when the bookstore launches. A separately hosted backend will provide the API, relational database, migrations, secrets, object storage, background work, backups, and health checks. Its CORS policy allows configured PWA origins. The public API URL may enter the static build; credentials and provider secrets must not.

Zod requires no service. Pino writes structured backend logs to standard output. Sentry DSNs and release identifiers are deployment configuration; Sentry remains inactive until initialization is deliberately added and reviewed against the privacy policy.

Clone this wiki locally