Skip to content

duggal1/rustify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 🚀 Rustify CLI - Comprehensive User Guide

Table of Contents

Installation

macOS

# Using curl (recommended)
curl -fsSL https://raw.githubusercontent.com/duggal1/rustify/main/install.sh | bash
# Verify installation
rustify --version

Linux

# Using curl
curl -fsSL https://raw.githubusercontent.com/duggal1/rustify/main/install.sh | bash

Windows

# Run PowerShell as Administrator
iwr -useb https://raw.githubusercontent.com/duggal1/rustify/main/install.ps1 | iex

Getting Started

  1. Initialize a New Project

    # Create a new project with default framework (Bun)
    rustify init
    # Create a project with specific framework
    rustify init --type react
  2. Basic Deployment

    # Development deployment
    rustify deploy
    # Production deployment
    rustify deploy --prod

Framework Support

React Projects

# Initialize
rustify init --type react
# Deploy with optimizations
rustify deploy --prod

Features:

  • Webpack optimization
  • Code splitting
  • Tree shaking
  • Bundle analysis

Vue Projects

# Initialize
rustify init --type vue
# Deploy with modern mode
rustify deploy --prod

Features:

  • Modern mode building
  • Auto compression
  • Asset optimization

MERN Stack

# Initialize
rustify init --type mern
# Deploy full stack
rustify deploy --prod

Features:

  • Full-stack optimization
  • MongoDB configuration
  • Express server setup
  • React optimization

Other Supported Frameworks

# Svelte
rustify init --type svelte
# Angular
rustify init --type angular
# Astro
rustify init --type astro
# Remix
rustify init --type remix

Deployment Guide

Development Deployment

# Basic deployment
rustify deploy
# Custom port
rustify deploy --port 3000
# With cleanup
rustify deploy --cleanup

Production Deployment

# Full production setup
rustify deploy --prod
# Production with custom port
rustify deploy --prod --port 3000
# Production with auto-scaling
rustify deploy --prod --rpl

Advanced Deployment Options

# Full production deployment with all features
rustify deploy --prod --rpl --port 3000 --cleanup

Production Features

  1. Docker Integration

    • Automatic Docker setup
    • Optimized Dockerfile generation
    • Multi-stage builds
    • Layer caching
  2. Kubernetes Setup

    # Deploy to Kubernetes
    rustify deploy --prod

    Features:

    • Automatic namespace creation
    • Resource management
    • Health checks
    • Load balancing
  3. Monitoring

    • CPU usage tracking
    • Memory monitoring
    • Request tracking
    • Error rate monitoring

Auto-scaling Guide

Enable Auto-scaling

# Enable auto-scaling in production
rustify deploy --prod --rpl

Auto-scaling Features

  • CPU-based scaling (70% threshold)
  • Memory-based scaling (80% threshold)
  • Automatic replica management
  • Scale up to 10 pods
  • Intelligent scaling policies

Scaling Configuration

# Default scaling configuration
minReplicas: 1
maxReplicas: 10
metrics:
  cpu: 70%
  memory: 80%

Troubleshooting

Common Issues

  1. Docker Issues

    # If Docker isn't running
    Error: Docker daemon not responding
    Solution: Start Docker Desktop manually
  2. Port Conflicts

    # If default port is in use
    rustify deploy --port 3001
  3. Deployment Failures

    # Clean up and retry
    rustify deploy --cleanup

Best Practices

  • Development
    # Use development mode for testing
    rustify deploy
  • Production
    # Always use production mode with cleanup
    rustify deploy --prod --cleanup
  • High Traffic Apps
    # Enable auto-scaling for production
    rustify deploy --prod --rpl

Performance Tips

  • Resource Optimization
    • Use --prod flag for production optimizations
    • Enable auto-scaling for high-traffic periods
    • Use --cleanup flag for fresh deployments
  • Monitoring
    • Check logs regularly
    • Monitor resource usage
    • Track scaling events
  • Maintenance
    # Regular cleanup
    rustify deploy --cleanup
    
    # Update deployments
    rustify deploy --prod --rpl --cleanup

Environment Variables

# Production environment
NODE_ENV=production
PORT=3000
# Development environment
NODE_ENV=development
PORT=8000

Security Best Practices

  • Production Deployments
    • Always use --prod flag
    • Enable security features
    • Use proper namespaces
  • Docker Security
    • Non-root user
    • Limited permissions
    • Secure defaults
  • Kubernetes Security
    • Network policies
    • Resource limits
    • Security contexts

CI/CD Integration

The CLI automatically generates GitHub Actions workflows:

name: CI/CD Pipeline
on:
  push:
    branches: [main, develop]
Features:
- Automated testing
- Docker image building
- Kubernetes deployment
- Security scanning

About

⚡️CLI to Rapidly Containerize Your Web Application!

Resources

Stars

Watchers

Forks

Packages

No packages published