Deployment ​
Coming Soon
This guide is currently under development. Check back soon for comprehensive deployment documentation including:
- Building for Production
- Docker Deployment
- Environment Configuration
- Performance Optimization
- Security Best Practices
- CI/CD Pipelines
- Monitoring and Logging
Quick Start ​
Check the project first — the mistakes that only surface in production are exactly the ones doctor looks for, and it exits non-zero so it fits in a CI step:
bash
asena doctorThen build your application:
bash
asena buildThen run the production build:
bash
bun dist/index.asena.jsTwo things worth checking before a first production deploy
buildOptions.minify.identifiersmust befalse. Component names are read at runtime, and a bundle built with identifiers minified fails to resolve them — in production only. The build forces it off andasena doctorreports it.keepNames: truedoes not substitute for it. See Minification and component names.- One copy of
@asenajs/asena,honoandzodeach. Two copies breakinstanceofand theHttpExceptionbrand, turning a deliberate404into a500with no clue as to why.asena doctorchecks for this.
Graceful Shutdown and Probes ​
Two things a deployment needs are already available:
- Signals are handled by default.
SIGTERM,SIGINTandSIGHUPcallserver.stop(), which stops taking new work, runs your components'@OnStophooks while the transports are still up, then releases everything in order. See Component Lifecycle. - Liveness and readiness are separate endpoints. Pass
health: { port }and point your restart policy at{path}/liveand your load balancer at{path}/ready. Readiness answers503for the whole drain, so an instance is pulled from rotation while it still has work to finish. See Health probes.
Related ​
- CLI Build Command - Building a production bundle
- asena doctor - Pre-flight check for the project's configuration
- CLI Configuration - Build options and output
- Server Configuration - Runtime server settings
- Component Lifecycle - Graceful shutdown, signals and health probes
- GitHub - Follow the repository for updates