1037 lines
30 KiB
Makefile
1037 lines
30 KiB
Makefile
# Rustelo - Modern Rust Web Framework
|
||
# Just build and task runner configuration
|
||
|
||
# Set shell for commands
|
||
set shell := ["bash", "-c"]
|
||
|
||
alias b := build
|
||
alias t := test
|
||
alias d := dev
|
||
alias h := help
|
||
alias ha := help-all
|
||
alias o := overview
|
||
|
||
# Default recipe to display help
|
||
default:
|
||
@just --list
|
||
|
||
# Show comprehensive system overview
|
||
overview:
|
||
@echo "🔍 Running system overview..."
|
||
./scripts/overview.sh
|
||
|
||
# =============================================================================
|
||
# DEVELOPMENT COMMANDS
|
||
# =============================================================================
|
||
|
||
# Start development server with hot reload
|
||
dev:
|
||
@echo "🚀 Starting development server..."
|
||
cargo leptos watch
|
||
|
||
# Start development server with custom port
|
||
dev-port port="3030":
|
||
@echo "🚀 Starting development server on port {{port}}..."
|
||
LEPTOS_SITE_ADDR="127.0.0.1:{{port}}" cargo leptos watch
|
||
|
||
# Start development server with CSS watching
|
||
dev-full:
|
||
@echo "🚀 Starting full development environment..."
|
||
@just css-watch &
|
||
cargo leptos watch
|
||
|
||
# Watch CSS files for changes
|
||
css-watch:
|
||
@echo "👁️ Watching CSS files..."
|
||
npm run watch:css
|
||
|
||
# Build CSS files
|
||
css-build:
|
||
@echo "🎨 Building CSS files..."
|
||
npm run build:css
|
||
|
||
# Install development dependencies
|
||
dev-deps:
|
||
@echo "📦 Installing development dependencies..."
|
||
@just npm-install
|
||
@just cargo-check
|
||
|
||
# =============================================================================
|
||
# BUILD COMMANDS
|
||
# =============================================================================
|
||
|
||
# Build the project for development
|
||
build:
|
||
@echo "🔨 Building project for development..."
|
||
cargo leptos build
|
||
|
||
# Build the project for production
|
||
build-prod:
|
||
@echo "🔨 Building project for production..."
|
||
cargo leptos build --release
|
||
|
||
# Build with specific features
|
||
build-features features:
|
||
@echo "🔨 Building with features: {{features}}..."
|
||
cargo leptos build --features {{features}}
|
||
|
||
# Build the project with Cargo
|
||
cbuild *ARGS:
|
||
@echo "🔨 Building project with Cargo..."
|
||
cargo build {{ARGS}}
|
||
|
||
# Build the project for production
|
||
# Clean build artifacts
|
||
clean:
|
||
@echo "🧹 Cleaning build artifacts..."
|
||
cargo clean
|
||
rm -rf target/
|
||
rm -rf node_modules/
|
||
|
||
# =============================================================================
|
||
# TESTING COMMANDS
|
||
# =============================================================================
|
||
|
||
# Run all tests
|
||
test:
|
||
@echo "🧪 Running all tests..."
|
||
cargo test
|
||
|
||
# Run tests with coverage
|
||
test-coverage:
|
||
@echo "🧪 Running tests with coverage..."
|
||
cargo tarpaulin --out html
|
||
|
||
# Run end-to-end tests
|
||
test-e2e:
|
||
@echo "🧪 Running end-to-end tests..."
|
||
cd end2end && npx playwright test
|
||
|
||
# Run specific test
|
||
test-specific test:
|
||
@echo "🧪 Running test: {{test}}..."
|
||
cargo test {{test}}
|
||
|
||
# Run tests in watch mode
|
||
test-watch:
|
||
@echo "🧪 Running tests in watch mode..."
|
||
cargo watch -x test
|
||
|
||
# Run expand
|
||
expand *ARGS:
|
||
@echo "🧪 Expand code ..."
|
||
cargo expand {{ARGS}}
|
||
|
||
# =============================================================================
|
||
# CODE QUALITY COMMANDS
|
||
# =============================================================================
|
||
|
||
# Check code with clippy
|
||
check *ARGS:
|
||
@echo "🔍 Checking code with clippy..."
|
||
cargo clippy {{ARGS}}
|
||
|
||
# Check all code with clippy
|
||
check-all:
|
||
@echo "🔍 Checking code with clippy..."
|
||
cargo clippy --all-targets --all-features
|
||
|
||
# Check code with strict clippy
|
||
check-strict:
|
||
@echo "🔍 Checking code with strict clippy..."
|
||
cargo clippy --all-targets --all-features -- -D warnings
|
||
|
||
# Format code
|
||
fm *ARGS:
|
||
@echo "✨ Formatting code..."
|
||
cargo fmt
|
||
cargo +nightly fmt {{ARGS}}
|
||
|
||
# Check if code is formatted
|
||
fmt-check *ARGS:
|
||
@echo "✨ Checking code formatting..."
|
||
cargo +nightly fmt --check {{ARGS}}
|
||
|
||
# Security audit
|
||
audit:
|
||
@echo "🔒 Running security audit..."
|
||
cargo audit
|
||
|
||
# Check for unused dependencies
|
||
unused-deps:
|
||
@echo "🔍 Checking for unused dependencies..."
|
||
cargo machete
|
||
|
||
# Run all quality checks
|
||
quality:
|
||
@echo "🔍 Running all quality checks..."
|
||
@just fmt-check
|
||
@just check-strict
|
||
@just audit
|
||
@just test
|
||
|
||
# =============================================================================
|
||
# DATABASE COMMANDS
|
||
# =============================================================================
|
||
|
||
# Database setup and initialization
|
||
db-setup:
|
||
@echo "🗄️ Setting up database..."
|
||
./scripts/databases/db.sh setup setup
|
||
|
||
# Create database
|
||
db-create:
|
||
@echo "🗄️ Creating database..."
|
||
./scripts/databases/db.sh setup create
|
||
|
||
# Run database migrations
|
||
db-migrate:
|
||
@echo "🗄️ Running database migrations..."
|
||
./scripts/databases/db.sh migrate run
|
||
|
||
# Create new migration
|
||
db-migration name:
|
||
@echo "🗄️ Creating new migration: {{name}}..."
|
||
./scripts/databases/db.sh migrate create --name {{name}}
|
||
|
||
# Database status
|
||
db-status:
|
||
@echo "🗄️ Checking database status..."
|
||
./scripts/databases/db.sh status
|
||
|
||
# Database health check
|
||
db-health:
|
||
@echo "🗄️ Running database health check..."
|
||
./scripts/databases/db.sh health
|
||
|
||
# Reset database (drop + create + migrate)
|
||
db-reset:
|
||
@echo "🗄️ Resetting database..."
|
||
./scripts/databases/db.sh setup reset
|
||
|
||
# Backup database
|
||
db-backup:
|
||
@echo "🗄️ Creating database backup..."
|
||
./scripts/databases/db.sh backup create
|
||
|
||
# Restore database from backup
|
||
db-restore file:
|
||
@echo "🗄️ Restoring database from {{file}}..."
|
||
./scripts/databases/db.sh backup restore --file {{file}}
|
||
|
||
# Database monitoring
|
||
db-monitor:
|
||
@echo "🗄️ Starting database monitoring..."
|
||
./scripts/databases/db.sh monitor monitor
|
||
|
||
# Show database size
|
||
db-size:
|
||
@echo "🗄️ Showing database size..."
|
||
./scripts/databases/db.sh utils size
|
||
|
||
# Optimize database
|
||
db-optimize:
|
||
@echo "🗄️ Optimizing database..."
|
||
./scripts/databases/db.sh utils optimize
|
||
|
||
# =============================================================================
|
||
# SETUP COMMANDS
|
||
# =============================================================================
|
||
|
||
# Complete project setup
|
||
setup:
|
||
@echo "🔧 Setting up project..."
|
||
./scripts/setup/setup_dev.sh
|
||
|
||
# Setup with custom name
|
||
setup-name name:
|
||
@echo "🔧 Setting up project with name: {{name}}..."
|
||
./scripts/setup/setup_dev.sh --name {{name}}
|
||
|
||
# Setup for production
|
||
setup-prod:
|
||
@echo "🔧 Setting up project for production..."
|
||
./scripts/setup/setup_dev.sh --env prod
|
||
|
||
# Install system dependencies
|
||
setup-deps:
|
||
@echo "🔧 Installing system dependencies..."
|
||
./scripts/setup/install-dev.sh
|
||
|
||
# Setup wizard
|
||
setup-wizard:
|
||
@echo "🔧 Setting configuration wizard..."
|
||
./scripts/setup/run_wizard.sh
|
||
|
||
# Setup configuration
|
||
setup-config:
|
||
@echo "🔧 Setting up configuration..."
|
||
./scripts/setup/setup-config.sh
|
||
|
||
# Setup encryption
|
||
setup-encryption:
|
||
@echo "🔧 Setting up encryption..."
|
||
./scripts/setup/setup_encryption.sh
|
||
|
||
# Generate TLS certificates
|
||
setup-tls:
|
||
@echo "🔧 Generating TLS certificates..."
|
||
./scripts/utils/generate_certs.sh
|
||
|
||
# =============================================================================
|
||
# DOCKER COMMANDS
|
||
# =============================================================================
|
||
|
||
# Build Docker image
|
||
docker-build:
|
||
@echo "🐳 Building Docker image..."
|
||
docker build -t rustelo .
|
||
|
||
# Build Docker image for development
|
||
docker-build-dev:
|
||
@echo "🐳 Building Docker development image..."
|
||
docker build -f Dockerfile.dev -t rustelo:dev .
|
||
|
||
# Run Docker container
|
||
docker-run:
|
||
@echo "🐳 Running Docker container..."
|
||
docker run -p 3030:3030 rustelo
|
||
|
||
# Run Docker development container
|
||
docker-run-dev:
|
||
@echo "🐳 Running Docker development container..."
|
||
docker run -p 3030:3030 -v $(pwd):/app rustelo:dev
|
||
|
||
# Start Docker Compose
|
||
docker-up:
|
||
@echo "🐳 Starting Docker Compose..."
|
||
docker-compose up -d
|
||
|
||
# Stop Docker Compose
|
||
docker-down:
|
||
@echo "🐳 Stopping Docker Compose..."
|
||
docker-compose down
|
||
|
||
# View Docker logs
|
||
docker-logs:
|
||
@echo "🐳 Viewing Docker logs..."
|
||
docker-compose logs -f
|
||
|
||
# =============================================================================
|
||
# DEPLOYMENT COMMANDS
|
||
# =============================================================================
|
||
|
||
# Deploy to production
|
||
deploy:
|
||
@echo "🚀 Deploying to production..."
|
||
./scripts/deploy.sh deploy
|
||
|
||
# Deploy with specific environment
|
||
deploy-env env:
|
||
@echo "🚀 Deploying to {{env}}..."
|
||
./scripts/deploy.sh deploy --env {{env}}
|
||
|
||
# Deploy with migration
|
||
deploy-migrate:
|
||
@echo "🚀 Deploying with migration..."
|
||
./scripts/deploy.sh deploy --migrate
|
||
|
||
# Deploy with backup
|
||
deploy-backup:
|
||
@echo "🚀 Deploying with backup..."
|
||
./scripts/deploy.sh deploy --backup
|
||
|
||
# Check deployment status
|
||
deploy-status:
|
||
@echo "🚀 Checking deployment status..."
|
||
./scripts/deploy.sh status
|
||
|
||
# =============================================================================
|
||
# MONITORING COMMANDS
|
||
# =============================================================================
|
||
|
||
# Check application health
|
||
health:
|
||
@echo "🏥 Checking application health..."
|
||
curl -f http://localhost:3030/health || echo "Health check failed"
|
||
|
||
# Check readiness
|
||
ready:
|
||
@echo "🏥 Checking application readiness..."
|
||
curl -f http://localhost:3030/health/ready || echo "Readiness check failed"
|
||
|
||
# Check liveness
|
||
live:
|
||
@echo "🏥 Checking application liveness..."
|
||
curl -f http://localhost:3030/health/live || echo "Liveness check failed"
|
||
|
||
# View metrics
|
||
metrics:
|
||
@echo "📊 Viewing metrics..."
|
||
curl -s http://localhost:3030/metrics
|
||
|
||
# View logs
|
||
logs:
|
||
@echo "📋 Viewing logs..."
|
||
tail -f logs/app.log
|
||
|
||
# =============================================================================
|
||
# UTILITY COMMANDS
|
||
# =============================================================================
|
||
|
||
# Install Node.js dependencies
|
||
npm-install:
|
||
@echo "📦 Installing Node.js dependencies..."
|
||
npm install
|
||
|
||
# Install Rust dependencies (check)
|
||
cargo-check:
|
||
@echo "📦 Checking Rust dependencies..."
|
||
cargo check
|
||
|
||
# Update dependencies
|
||
update:
|
||
@echo "📦 Updating dependencies..."
|
||
cargo update
|
||
npm update
|
||
|
||
# Show project information
|
||
info:
|
||
@echo "ℹ️ Project Information:"
|
||
@echo " Rust version: $(rustc --version)"
|
||
@echo " Cargo version: $(cargo --version)"
|
||
@echo " Node.js version: $(node --version)"
|
||
@echo " npm version: $(npm --version)"
|
||
@echo " Project root: $(pwd)"
|
||
|
||
# Show disk usage
|
||
disk-usage:
|
||
@echo "💾 Disk usage:"
|
||
@echo " Target directory: $(du -sh target/ 2>/dev/null || echo 'N/A')"
|
||
@echo " Node modules: $(du -sh node_modules/ 2>/dev/null || echo 'N/A')"
|
||
|
||
# Generate project documentation
|
||
docs:
|
||
@echo "📚 Generating documentation..."
|
||
cargo doc --open
|
||
|
||
# Build cargo documentation with logo assets
|
||
docs-cargo:
|
||
@echo "📚 Building cargo documentation with logo assets..."
|
||
./scripts/build-docs.sh
|
||
|
||
# Serve documentation
|
||
docs-serve:
|
||
@echo "📚 Serving documentation..."
|
||
cargo doc --no-deps
|
||
python3 -m http.server 8000 -d target/doc
|
||
|
||
# Setup comprehensive documentation system
|
||
docs-setup:
|
||
@echo "📚 Setting up documentation system..."
|
||
./scripts/setup-docs.sh --full
|
||
|
||
# Start documentation development server
|
||
docs-dev:
|
||
@echo "📚 Starting documentation development server..."
|
||
./scripts/docs-dev.sh
|
||
|
||
# Build documentation with mdBook
|
||
docs-build:
|
||
@echo "📚 Building documentation..."
|
||
./scripts/build-docs.sh
|
||
|
||
# Build documentation and sync existing content
|
||
docs-build-sync:
|
||
@echo "📚 Building documentation with content sync..."
|
||
./scripts/build-docs.sh --sync
|
||
|
||
# Watch documentation for changes
|
||
docs-watch:
|
||
@echo "📚 Watching documentation for changes..."
|
||
./scripts/build-docs.sh --watch
|
||
|
||
# Deploy documentation to GitHub Pages
|
||
docs-deploy-github:
|
||
@echo "📚 Deploying documentation to GitHub Pages..."
|
||
./scripts/deploy-docs.sh github-pages
|
||
|
||
# Deploy documentation to Netlify
|
||
docs-deploy-netlify:
|
||
@echo "📚 Deploying documentation to Netlify..."
|
||
./scripts/deploy-docs.sh netlify
|
||
|
||
# Deploy documentation to Vercel
|
||
docs-deploy-vercel:
|
||
@echo "📚 Deploying documentation to Vercel..."
|
||
./scripts/deploy-docs.sh vercel
|
||
|
||
# Build documentation Docker image
|
||
docs-docker:
|
||
@echo "📚 Building documentation Docker image..."
|
||
./scripts/deploy-docs.sh docker
|
||
|
||
# Generate dynamic documentation content
|
||
docs-generate:
|
||
@echo "📚 Generating dynamic documentation content..."
|
||
./scripts/generate-content.sh
|
||
|
||
# Serve documentation locally with nginx
|
||
docs-serve-local:
|
||
@echo "📚 Serving documentation locally..."
|
||
./scripts/deploy-docs.sh local
|
||
|
||
# Check documentation for broken links
|
||
docs-check-links:
|
||
@echo "📚 Checking documentation for broken links..."
|
||
mdbook-linkcheck || echo "Note: Install mdbook-linkcheck for link checking"
|
||
|
||
# Serve mdBook documentation with auto-open
|
||
docs-book:
|
||
@echo "📚 Serving mdBook documentation..."
|
||
mdbook serve --open
|
||
|
||
# Build mdBook for changes
|
||
docs-book-build:
|
||
@echo "📚 Building mdBook for changes..."
|
||
mdbook build
|
||
|
||
# Watch mdBook for changes
|
||
docs-book-watch:
|
||
@echo "📚 Watching mdBook for changes..."
|
||
mdbook watch
|
||
|
||
# Serve mdBook on specific port
|
||
docs-book-port PORT:
|
||
@echo "📚 Serving mdBook on port {{PORT}}..."
|
||
mdbook serve --port {{PORT}} --open
|
||
|
||
# Clean documentation build files
|
||
docs-clean:
|
||
@echo "📚 Cleaning documentation build files..."
|
||
rm -rf book-output
|
||
rm -rf _book
|
||
@echo "Documentation build files cleaned"
|
||
|
||
# Complete documentation workflow (build, check, serve)
|
||
docs-workflow:
|
||
@echo "📚 Running complete documentation workflow..."
|
||
just docs-build-sync
|
||
just docs-check-links
|
||
just docs-serve-local
|
||
|
||
# Verify setup and dependencies
|
||
verify-setup:
|
||
@echo "🔍 Verifying Rustelo setup..."
|
||
./scripts/verify-setup.sh
|
||
|
||
# Verify setup with verbose output
|
||
verify-setup-verbose:
|
||
@echo "🔍 Verifying Rustelo setup (verbose)..."
|
||
./scripts/verify-setup.sh --verbose
|
||
|
||
# Generate setup completion report
|
||
generate-setup-report:
|
||
@echo "📝 Generating setup completion report..."
|
||
./scripts/generate-setup-complete.sh
|
||
|
||
# Regenerate setup completion report with current status
|
||
regenerate-setup-report:
|
||
@echo "📝 Regenerating setup completion report..."
|
||
rm -f SETUP_COMPLETE.md
|
||
./scripts/generate-setup-complete.sh
|
||
|
||
# Run post-setup hook to finalize installation
|
||
post-setup:
|
||
@echo "🔧 Running post-setup finalization..."
|
||
./scripts/post-setup-hook.sh
|
||
|
||
# Run post-setup hook for documentation setup
|
||
post-setup-docs:
|
||
@echo "🔧 Running post-setup finalization for documentation..."
|
||
./scripts/post-setup-hook.sh documentation
|
||
|
||
# =============================================================================
|
||
# CONFIGURATION COMMANDS
|
||
# =============================================================================
|
||
|
||
# Show configuration
|
||
config:
|
||
@echo "⚙️ Configuration:"
|
||
@cat .env 2>/dev/null || echo "No .env file found"
|
||
|
||
# Encrypt configuration value
|
||
encrypt value:
|
||
@echo "🔒 Encrypting value..."
|
||
cargo run --bin config_crypto_tool encrypt "{{value}}"
|
||
|
||
# Decrypt configuration value
|
||
decrypt value:
|
||
@echo "🔓 Decrypting value..."
|
||
cargo run --bin config_crypto_tool decrypt "{{value}}"
|
||
|
||
# Test encryption
|
||
test-encryption:
|
||
@echo "🔒 Testing encryption..."
|
||
./scripts/utils/test_encryption.sh
|
||
|
||
# =============================================================================
|
||
# TOOLS COMMANDS
|
||
# =============================================================================
|
||
|
||
# Configure features
|
||
configure-features:
|
||
@echo "🔧 Configuring features..."
|
||
./scripts/utils/configure-features.sh
|
||
|
||
# Build examples
|
||
build-examples:
|
||
@echo "🔧 Building examples..."
|
||
./scripts/utils/build-examples.sh
|
||
|
||
# Generate demo root path
|
||
demo-root:
|
||
@echo "🔧 Generating demo root path..."
|
||
./scripts/utils/demo_root_path.sh
|
||
|
||
# =============================================================================
|
||
# PERFORMANCE COMMANDS
|
||
# =============================================================================
|
||
|
||
# Run performance benchmarks
|
||
perf-benchmark:
|
||
@echo "⚡ Running performance benchmarks..."
|
||
./scripts/tools/performance.sh benchmark load
|
||
|
||
# Run stress test
|
||
perf-stress:
|
||
@echo "⚡ Running stress test..."
|
||
./scripts/tools/performance.sh benchmark stress
|
||
|
||
# Live performance monitoring
|
||
perf-monitor:
|
||
@echo "⚡ Starting performance monitoring..."
|
||
./scripts/tools/performance.sh monitor live
|
||
|
||
# Generate performance report
|
||
perf-report:
|
||
@echo "⚡ Generating performance report..."
|
||
./scripts/tools/performance.sh analyze report
|
||
|
||
# Setup performance tools
|
||
perf-setup:
|
||
@echo "⚡ Setting up performance tools..."
|
||
./scripts/tools/performance.sh tools setup
|
||
|
||
# =============================================================================
|
||
# SECURITY COMMANDS
|
||
# =============================================================================
|
||
|
||
# Run security audit
|
||
security-audit:
|
||
@echo "🔒 Running security audit..."
|
||
./scripts/tools/security.sh audit full
|
||
|
||
# Scan for secrets
|
||
security-secrets:
|
||
@echo "🔒 Scanning for secrets..."
|
||
./scripts/tools/security.sh audit secrets
|
||
|
||
# Check security dependencies
|
||
security-deps:
|
||
@echo "🔒 Checking security dependencies..."
|
||
./scripts/tools/security.sh audit dependencies
|
||
|
||
# Fix security issues
|
||
security-fix:
|
||
@echo "🔒 Fixing security issues..."
|
||
./scripts/tools/security.sh audit dependencies --fix
|
||
|
||
# Generate security report
|
||
security-report:
|
||
@echo "🔒 Generating security report..."
|
||
./scripts/tools/security.sh analyze report
|
||
|
||
# Setup security tools
|
||
security-setup:
|
||
@echo "🔒 Setting up security tools..."
|
||
./scripts/tools/security.sh tools setup
|
||
|
||
# =============================================================================
|
||
# CI/CD COMMANDS
|
||
# =============================================================================
|
||
|
||
# Run CI pipeline
|
||
ci-pipeline:
|
||
@echo "🚀 Running CI pipeline..."
|
||
./scripts/tools/ci.sh pipeline run
|
||
|
||
# Build Docker image
|
||
ci-build:
|
||
@echo "🚀 Building Docker image..."
|
||
./scripts/tools/ci.sh build docker
|
||
|
||
# Run all tests
|
||
ci-test:
|
||
@echo "🚀 Running all tests..."
|
||
./scripts/tools/ci.sh test all
|
||
|
||
# Run quality checks
|
||
ci-quality:
|
||
@echo "🚀 Running quality checks..."
|
||
./scripts/tools/ci.sh quality lint
|
||
|
||
# Deploy to staging
|
||
ci-deploy-staging:
|
||
@echo "🚀 Deploying to staging..."
|
||
./scripts/tools/ci.sh deploy staging
|
||
|
||
# Deploy to production
|
||
ci-deploy-prod:
|
||
@echo "🚀 Deploying to production..."
|
||
./scripts/tools/ci.sh deploy production
|
||
|
||
# Generate CI report
|
||
ci-report:
|
||
@echo "🚀 Generating CI report..."
|
||
./scripts/tools/ci.sh report
|
||
|
||
# =============================================================================
|
||
# MONITORING COMMANDS
|
||
# =============================================================================
|
||
|
||
# Monitor application health
|
||
monitor-health:
|
||
@echo "📊 Monitoring application health..."
|
||
./scripts/tools/monitoring.sh monitor health
|
||
|
||
# Monitor metrics
|
||
monitor-metrics:
|
||
@echo "📊 Monitoring metrics..."
|
||
./scripts/tools/monitoring.sh monitor metrics
|
||
|
||
# Monitor logs
|
||
monitor-logs:
|
||
@echo "📊 Monitoring logs..."
|
||
./scripts/tools/monitoring.sh monitor logs
|
||
|
||
# Monitor resources
|
||
monitor-resources:
|
||
@echo "📊 Monitoring resources..."
|
||
./scripts/tools/monitoring.sh monitor resources
|
||
|
||
# Monitor all
|
||
monitor-all:
|
||
@echo "📊 Monitoring all metrics..."
|
||
./scripts/tools/monitoring.sh monitor all
|
||
|
||
# Generate monitoring report
|
||
monitor-report:
|
||
@echo "📊 Generating monitoring report..."
|
||
./scripts/tools/monitoring.sh reports generate
|
||
|
||
# Setup monitoring tools
|
||
monitor-setup:
|
||
@echo "📊 Setting up monitoring tools..."
|
||
./scripts/tools/monitoring.sh tools setup
|
||
|
||
# =============================================================================
|
||
# SCRIPT MANAGEMENT COMMANDS
|
||
# =============================================================================
|
||
|
||
# Make all scripts executable
|
||
scripts-executable:
|
||
@echo "🔧 Making all scripts executable..."
|
||
./scripts/make-executable.sh
|
||
|
||
# Make all scripts executable with verbose output
|
||
scripts-executable-verbose:
|
||
@echo "🔧 Making all scripts executable (verbose)..."
|
||
./scripts/make-executable.sh --verbose
|
||
|
||
# List all available scripts
|
||
scripts-list:
|
||
@echo "📋 Available scripts:"
|
||
@echo ""
|
||
@echo "🗄️ Database Scripts:"
|
||
@ls -la scripts/databases/*.sh 2>/dev/null || echo " No database scripts found"
|
||
@echo ""
|
||
@echo "🔧 Setup Scripts:"
|
||
@ls -la scripts/setup/*.sh 2>/dev/null || echo " No setup scripts found"
|
||
@echo ""
|
||
@echo "🛠️ Tool Scripts:"
|
||
@ls -la scripts/tools/*.sh 2>/dev/null || echo " No tool scripts found"
|
||
@echo ""
|
||
@echo "🔧 Utility Scripts:"
|
||
@ls -la scripts/utils/*.sh 2>/dev/null || echo " No utility scripts found"
|
||
|
||
# Check script permissions
|
||
scripts-check:
|
||
@echo "🔍 Checking script permissions..."
|
||
@find scripts -name "*.sh" -type f ! -executable -exec echo "❌ Not executable: {}" \; || echo "✅ All scripts are executable"
|
||
|
||
# =============================================================================
|
||
# MAINTENANCE COMMANDS
|
||
# =============================================================================
|
||
|
||
# Clean everything
|
||
clean-all:
|
||
@echo "🧹 Cleaning everything..."
|
||
@just clean
|
||
rm -rf logs/
|
||
rm -rf backups/
|
||
docker system prune -f
|
||
|
||
# Backup project
|
||
backup:
|
||
@echo "💾 Creating project backup..."
|
||
@just db-backup
|
||
tar -czf backup-$(date +%Y%m%d-%H%M%S).tar.gz \
|
||
--exclude=target \
|
||
--exclude=node_modules \
|
||
--exclude=.git \
|
||
.
|
||
|
||
# Check system requirements
|
||
check-requirements:
|
||
@echo "✅ Checking system requirements..."
|
||
@echo "Rust: $(rustc --version 2>/dev/null || echo 'rust Not installed')"
|
||
@echo "Cargo: $(cargo --version 2>/dev/null || echo 'cargo Not installed')"
|
||
@echo "Node.js: $(node --version 2>/dev/null || echo 'node Not installed')"
|
||
@echo "pnpm: $(pnpm --version 2>/dev/null || echo 'pnpm Not installed')"
|
||
@echo "mdbook: $(mdbook --version 2>/dev/null || echo 'mdbook Not installed')"
|
||
@echo "Docker: $(docker --version 2>/dev/null || echo 'docker Not installed')"
|
||
@echo "PostgreSQL: $(psql --version 2>/dev/null || echo 'psql for PostgreSQL Not installed')"
|
||
@echo "SQLite: $(sqlite3 --version 2>/dev/null || echo 'sqlite3 Not installed')"
|
||
|
||
# =============================================================================
|
||
# WORKFLOW COMMANDS
|
||
# =============================================================================
|
||
|
||
# Complete development workflow
|
||
workflow-dev:
|
||
@echo "🔄 Running development workflow..."
|
||
@just setup-deps
|
||
@just css-build
|
||
@just check
|
||
@just test
|
||
@just dev
|
||
|
||
# Complete production workflow
|
||
workflow-prod:
|
||
@echo "🔄 Running production workflow..."
|
||
@just quality
|
||
@just build-prod
|
||
@just docker-build
|
||
@just deploy
|
||
|
||
# Pre-commit workflow
|
||
pre-commit:
|
||
@echo "🔄 Running pre-commit workflow..."
|
||
@just fmt
|
||
@just check-strict
|
||
@just test
|
||
@just css-build
|
||
|
||
# CI/CD workflow
|
||
ci:
|
||
@echo "🔄 Running CI/CD workflow..."
|
||
@just fmt-check
|
||
@just check-strict
|
||
@just test
|
||
@just audit
|
||
@just build-prod
|
||
|
||
# =============================================================================
|
||
# HELP COMMANDS
|
||
# =============================================================================
|
||
|
||
# Show help for development commands
|
||
help-dev:
|
||
@echo "🚀 Development Commands:"
|
||
@echo " dev - Start development server"
|
||
@echo " dev-full - Start dev server with CSS watching"
|
||
@echo " css-watch - Watch CSS files"
|
||
@echo " css-build - Build CSS files"
|
||
@echo " dev-deps - Install development dependencies"
|
||
|
||
# Show help for build commands
|
||
help-build:
|
||
@echo "🔨 Builyyd Commands:"
|
||
@echo " build - Build for development"
|
||
@echo " build-prod - Build for production"
|
||
@echo " build-features- Build with specific features"
|
||
@echo " clean - Clean build artifacts"
|
||
|
||
|
||
help-setup:
|
||
@echo "🔧 Setup project configuration:"
|
||
@echo " setup-prod - Setup for production"
|
||
@echo " setup-deps - Install system dependencies"
|
||
@echo " setup - Setting up project..."
|
||
@echo " setup-name name - Setup with custom name"
|
||
@echo " setup-wizard - Setup config via wizard"
|
||
@echo " setup-config - Setting up configuration..."
|
||
@echo " setup-encryption - Setting up encryption"
|
||
@echo " setup-tls - Generate TLS certificates"
|
||
|
||
help-db:
|
||
@echo "🗄️ Database Commands:"
|
||
@echo " db-setup - Setup database"
|
||
@echo " db-create - Create database"
|
||
@echo " db-migrate - Run migrations"
|
||
@echo " db-status - Check database status"
|
||
@echo " db-health - Database health check"
|
||
@echo " db-backup - Create backup"
|
||
@echo " db-restore - Restore from backup"
|
||
|
||
# Show help for documentation commands
|
||
help-docs:
|
||
@echo "📚 Documentation Commands:"
|
||
@echo " docs-setup - Setup documentation system"
|
||
@echo " docs-dev - Start documentation dev server"
|
||
@echo " docs-build - Build documentation"
|
||
@echo " docs-build-sync - Build with content sync"
|
||
@echo " docs-watch - Watch for changes"
|
||
@echo " docs-book - Serve mdBook with auto-open"
|
||
@echo " docs-book-build - Build mdBook"
|
||
@echo " docs-book-watch - Watch mdBook for changes"
|
||
@echo " docs-book-port PORT - Serve mdBook on specific port"
|
||
@echo " docs-deploy-github - Deploy to GitHub Pages"
|
||
@echo " docs-deploy-netlify - Deploy to Netlify"
|
||
@echo " docs-deploy-vercel - Deploy to Vercel"
|
||
@echo " docs-docker - Build Docker image"
|
||
@echo " docs-generate - Generate dynamic content"
|
||
@echo " docs-check-links - Check for broken links"
|
||
@echo " docs-clean - Clean build files"
|
||
@echo " docs-workflow - Complete workflow"
|
||
|
||
# Show help for verification commands
|
||
help-verify:
|
||
@echo "🔍 Verification Commands:"
|
||
@echo " verify-setup - Verify setup and dependencies"
|
||
@echo " verify-setup-verbose - Verify with verbose output"
|
||
@echo " check-requirements - Check system requirements"
|
||
@echo " generate-setup-report - Generate setup completion report"
|
||
@echo " regenerate-setup-report - Regenerate setup report"
|
||
@echo " post-setup - Run post-setup finalization"
|
||
@echo " post-setup-docs - Run post-setup for documentation"
|
||
|
||
# Show help for Docker commands
|
||
help-docker:
|
||
@echo "🐳 Docker Commands:"
|
||
@echo " docker-build - Build Docker image"
|
||
@echo " docker-run - Run Docker container"
|
||
@echo " docker-up - Start Docker Compose"
|
||
@echo " docker-down - Stop Docker Compose"
|
||
@echo " docker-logs - View Docker logs"
|
||
|
||
# Show help for performance commands
|
||
help-perf:
|
||
@echo "⚡ Performance Commands:"
|
||
@echo " perf-benchmark - Run performance benchmarks"
|
||
@echo " perf-stress - Run stress test"
|
||
@echo " perf-monitor - Live performance monitoring"
|
||
@echo " perf-report - Generate performance report"
|
||
@echo " perf-setup - Setup performance tools"
|
||
|
||
# Show help for security commands
|
||
help-security:
|
||
@echo "🔒 Security Commands:"
|
||
@echo " security-audit - Run security audit"
|
||
@echo " security-secrets- Scan for secrets"
|
||
@echo " security-deps - Check security dependencies"
|
||
@echo " security-fix - Fix security issues"
|
||
@echo " security-report - Generate security report"
|
||
@echo " security-setup - Setup security tools"
|
||
|
||
# Show help for CI/CD commands
|
||
help-ci:
|
||
@echo "🚀 CI/CD Commands:"
|
||
@echo " ci-pipeline - Run CI pipeline"
|
||
@echo " ci-build - Build Docker image"
|
||
@echo " ci-test - Run all tests"
|
||
@echo " ci-quality - Run quality checks"
|
||
@echo " ci-deploy-staging - Deploy to staging"
|
||
@echo " ci-deploy-prod - Deploy to production"
|
||
@echo " ci-report - Generate CI report"
|
||
|
||
# Show help for monitoring commands
|
||
help-monitor:
|
||
@echo "📊 Monitoring Commands:"
|
||
@echo " monitor-health - Monitor application health"
|
||
@echo " monitor-metrics - Monitor metrics"
|
||
@echo " monitor-logs - Monitor logs"
|
||
@echo " monitor-resources - Monitor resources"
|
||
@echo " monitor-all - Monitor all metrics"
|
||
@echo " monitor-report - Generate monitoring report"
|
||
@echo " monitor-setup - Setup monitoring tools"
|
||
|
||
# Show help for script management commands
|
||
help-scripts:
|
||
@echo "🔧 Script Management Commands:"
|
||
@echo " scripts-executable - Make all scripts executable"
|
||
@echo " scripts-executable-verbose - Make scripts executable (verbose)"
|
||
@echo " scripts-list - List all available scripts"
|
||
@echo " scripts-check - Check script permissions"
|
||
|
||
# Show help for overview commands
|
||
help-overview:
|
||
@echo "🔍 Overview Commands:"
|
||
@echo " overview - Show comprehensive system overview"
|
||
|
||
# Show comprehensive help
|
||
help-all:
|
||
@echo "📖 Rustelo - Complete Command Reference"
|
||
@echo ""
|
||
@just help-dev
|
||
@echo ""
|
||
@just help-build
|
||
@echo ""
|
||
@just help-db
|
||
@echo ""
|
||
@just help-docker
|
||
@echo ""
|
||
@just help-perf
|
||
@echo ""
|
||
@just help-security
|
||
@echo ""
|
||
@just help-ci
|
||
@echo ""
|
||
@just help-monitor
|
||
@echo ""
|
||
@just help-scripts
|
||
@echo ""
|
||
@just help-overview
|
||
@echo ""
|
||
@echo "For full command list, run: just --list"
|
||
help:
|
||
@echo " "
|
||
@echo "📖 RUSTELO help"
|
||
@just logo
|
||
@echo "🚀 Development help-dev"
|
||
@echo "🔨 Build help-build"
|
||
@echo "🔧 Script Management help-scripts"
|
||
@echo " "
|
||
@echo "🔍 Verification help-verify"
|
||
@echo "🔍 Overview help-overview"
|
||
@echo "🔧 Setup config. help-setup"
|
||
@echo " "
|
||
@echo "🗄️ Database help-db"
|
||
@echo "📚 Documentation help-docs"
|
||
@echo "🔒 Security help-security"
|
||
@echo " "
|
||
@echo "🐳 Docker help-docker"
|
||
@echo "⚡ Performance help-perf"
|
||
@echo "🚀 CI/CD help-ci"
|
||
@echo "📊 Monitoring help-monitor"
|
||
@echo "📖 Complete Reference help-all"
|
||
@echo ""
|
||
|
||
logo:
|
||
@echo " _ "
|
||
@echo " |_) _ _|_ _ | _ "
|
||
@echo " | \ |_| _> |_ (/_ | (_) "
|
||
@echo " ______________________________"
|
||
@echo " "
|