Production Guide
This page covers the operational defaults that make Sandcut a sane open-source base project.
Release topology
Keep application and docs releases separate.
- Application: root Worker + Container deployment
- Documentation:
apps/docsdeployed to Cloudflare Pages assandcut-docs
That separation avoids accidental coupling between docs publishing and production media traffic.
Capacity planning
The session pool and container max_instances should stay aligned.
Recommended practice:
- grow pool size only when real concurrency demands it
- keep scheduler lease TTL long enough for common jobs but short enough to recover from abandoned work
- reject oversized jobs before leasing a warm container
Security posture
Treat media processing as an untrusted workload.
- keep SSRF protections enabled
- validate remote inputs before use
- block raw FFmpeg input flags from user payloads
- isolate auth state from scheduler state in production where possible
- avoid committing any local secrets or
.dev.vars
Observability
Current response timing gives you:
- total request time
- container execution time
- upload time
For a broader rollout, add:
- request IDs
- structured logs
- scheduler metrics per session
- error-rate dashboards by code family
Pages deployment
Use a dedicated Pages project with these settings:
| Setting | Value |
|---|---|
| Project name | sandcut-docs |
| Root directory | apps/docs |
| Framework preset | None or VitePress |
| Build command | npm run build |
| Output directory | apps/docs/.vitepress/dist |
Commands
From the repo root:
bash
npm --prefix apps/docs install
npm --prefix apps/docs run dev
npm --prefix apps/docs run build
npm --prefix apps/docs run deploy