📦
Bunty

Deployment Overview

Bunty applications are highly flexible and can be deployed in numerous ways, from simple single-server setups to complex Kubernetes clusters. This guide will help you choose the right deployment strategy for your needs.

Deployment Options

Process Managers

  • Bun Run - Simple direct execution with Bun
  • PM2 - Production process manager with clustering
  • Systemd - Native Linux service management

Container Orchestration

Cloud Platforms

Serverless

Production Checklist

Before deploying to production, ensure you have:

  • Set NODE_ENV=production or BUN_ENV=production
  • Configured proper logging levels
  • Set up health checks and monitoring
  • Configured database connection pooling
  • Enabled CORS and security headers
  • Set up error tracking (Sentry, etc.)
  • Configured SSL/TLS certificates
  • Set up automatic backups
  • Implemented rate limiting
  • Configured proper environment variables

Performance Considerations

Clustering

Bunty supports clustering to utilize multiple CPU cores:

import { BuntyApplication } from '@bunty/common';

const app = await BuntyApplication.create({
  workers: 'auto', // or specify a number
});

Memory Management

Monitor and configure memory limits based on your deployment environment:

// Configure memory limits in your app
const app = await BuntyApplication.create({
  memoryLimit: '512M',
});

Connection Pooling

Optimize database connections for production:

import { DatabaseModule } from '@bunty/orm';

@Module({
  imports: [
    DatabaseModule.forRoot({
      pool: {
        min: 2,
        max: 10,
      },
    }),
  ],
})
export class AppModule {}

Next Steps

Choose your deployment method from the options above and follow the detailed guide for your platform.

Have questions? Join our Discord community
Found an issue? Edit this page on GitHub