Global Deployment
Deploy your Appmint applications to a global audience with our comprehensive deployment platform. Built on world-class infrastructure, our deployment system ensures your applications are fast, reliable, and available anywhere in the world.
Deployment Overview
Global Infrastructure
25+ Regions Worldwide
- North America: 8 regions (US, Canada)
- Europe: 7 regions (UK, Germany, France, Netherlands, Ireland, Sweden, Italy)
- Asia Pacific: 6 regions (Singapore, Japan, Australia, South Korea, India, Hong Kong)
- South America: 2 regions (Brazil, Argentina)
- Middle East & Africa: 2 regions (UAE, South Africa)
Edge Network:
- 150+ Edge Locations for CDN and edge computing
- Sub-50ms latency to 95% of global internet users
- Automatic failover and traffic routing
- DDoS protection and security at every location
Deployment Features
Zero-Downtime Deployments:
- Blue-green deployment strategy
- Rolling updates with health checks
- Automatic rollback on failures
- Progressive traffic shifting
Multi-Environment Support:
- Development, staging, and production environments
- Environment-specific configurations
- Automated promotion pipelines
- Branch-based deployments
Auto-Scaling:
- Horizontal pod autoscaling (HPA)
- Vertical pod autoscaling (VPA)
- Cluster autoscaling
- Predictive scaling based on traffic patterns
Quick Deployment
One-Click Deployment
Deploy your application in seconds using our dashboard or CLI.
Dashboard Deployment
# Navigate to your project dashboard
1. Click "Deploy" button
2. Select deployment environment (staging/production)
3. Choose target regions (auto-selected based on traffic)
4. Configure environment variables
5. Click "Deploy Now"
# Deployment status updates in real-time
✅ Building application...
✅ Running tests...
✅ Creating container image...
✅ Deploying to us-east-1...
✅ Deploying to eu-west-1...
✅ Running health checks...
✅ Deployment complete!
CLI Deployment
# Install Appmint CLI
npm install -g @appmint/cli
# Login to your account
appmint login
# Deploy to staging
appmint deploy --env=staging
# Deploy to production with specific regions
appmint deploy --env=production --regions=us-east-1,eu-west-1,ap-southeast-1
# Deploy with custom configuration
appmint deploy --env=production --config=production.yaml --auto-promote
Deployment Configuration
appmint.config.js
module.exports = {
// Application settings
app: {
name: 'my-awesome-app',
version: '1.2.0',
runtime: 'node18',
buildCommand: 'npm run build',
startCommand: 'npm start'
},
// Deployment configuration
deployment: {
// Environment configurations
environments: {
staging: {
regions: ['us-east-1'],
replicas: 2,
resources: {
cpu: '500m',
memory: '1Gi'
},
autoscaling: {
minReplicas: 1,
maxReplicas: 5,
targetCPUUtilization: 70
}
},
production: {
regions: ['us-east-1', 'eu-west-1', 'ap-southeast-1'],
replicas: 3,
resources: {
cpu: '1000m',
memory: '2Gi'
},
autoscaling: {
minReplicas: 3,
maxReplicas: 20,
targetCPUUtilization: 60
}
}
},
// Deployment strategy
strategy: {
type: 'rolling',
rollingUpdate: {
maxSurge: '25%',
maxUnavailable: '25%'
}
},
// Health checks
healthCheck: {
path: '/health',
port: 3000,
initialDelaySeconds: 30,
timeoutSeconds: 5,
failureThreshold: 3
}
},
// Environment variables
env: {
staging: {
NODE_ENV: 'staging',
DATABASE_URL: process.env.STAGING_DATABASE_URL,
API_BASE_URL: 'https://staging-api.myapp.com'
},
production: {
NODE_ENV: 'production',
DATABASE_URL: process.env.PRODUCTION_DATABASE_URL,
API_BASE_URL: 'https://api.myapp.com'
}
}
};
Advanced Deployment Strategies
Blue-Green Deployment
Eliminate downtime with blue-green deployments.
# Blue-Green deployment configuration
deployment:
strategy:
type: 'blue-green'
blueGreen:
# Active environment serves traffic
activeEnv: 'blue'
# Idle environment for new deployments
idleEnv: 'green'
# Automated promotion after health checks
autoPromote: true
# Time to wait before auto-promotion
autoPromoteDelay: '5m'
# Rollback configuration
rollback:
enabled: true
threshold: '5%' # Error rate threshold
window: '10m' # Monitoring window
Deployment Process:
- Deploy new version to idle environment (green)
- Run health checks and smoke tests
- Switch traffic from active (blue) to idle (green)
- Monitor for errors and performance issues
- Keep blue environment as backup for instant rollback
Canary Deployment
Gradually roll out changes to minimize risk.
# Canary deployment configuration
deployment:
strategy:
type: 'canary'
canary:
# Initial traffic percentage to canary
initialTraffic: 5
# Traffic increment steps
steps:
- traffic: 10
duration: '10m'
- traffic: 25
duration: '15m'
- traffic: 50
duration: '20m'
- traffic: 100
duration: '30m'
# Automatic rollback conditions
rollback:
enabled: true
conditions:
errorRate: '2%'
responseTime: '500ms'
successRate: '98%'
Canary Process:
- Deploy canary version alongside current version
- Route 5% of traffic to canary version
- Monitor metrics and gradually increase traffic
- Complete rollout or rollback based on performance
A/B Testing Deployment
Deploy multiple versions for experimentation.
# A/B testing configuration
deployment:
strategy:
type: 'ab-testing'
abTesting:
variants:
- name: 'control'
traffic: 50
version: 'v1.0.0'
- name: 'treatment'
traffic: 50
version: 'v1.1.0'
# Feature flag integration
featureFlags:
- flag: 'new-checkout-flow'
variants: ['treatment']
# Experiment duration
duration: '14d'
# Success metrics
metrics:
- name: 'conversion_rate'
target: 'increase'
- name: 'bounce_rate'
target: 'decrease'
Multi-Region Deployment
Global Traffic Routing
Deploy applications across multiple regions for optimal performance.
// Multi-region deployment configuration
const deploymentConfig = {
regions: {
// Primary regions (active-active)
'us-east-1': {
primary: true,
weight: 40,
resources: {
minReplicas: 3,
maxReplicas: 20
}
},
'eu-west-1': {
primary: true,
weight: 35,
resources: {
minReplicas: 3,
maxReplicas: 15
}
},
'ap-southeast-1': {
primary: true,
weight: 25,
resources: {
minReplicas: 2,
maxReplicas: 10
}
},
// Disaster recovery regions
'us-west-2': {
primary: false,
standby: true,
resources: {
minReplicas: 1,
maxReplicas: 5
}
}
},
// Traffic routing rules
routing: {
strategy: 'latency', // Options: latency, geolocation, weighted
healthCheck: {
enabled: true,
failoverThreshold: 3,
recoveryThreshold: 2
},
// Geographic routing preferences
geoRouting: {
'US': ['us-east-1', 'us-west-2'],
'EU': ['eu-west-1', 'eu-central-1'],
'APAC': ['ap-southeast-1', 'ap-northeast-1'],
'DEFAULT': ['us-east-1']
}
}
};
Regional Deployment Commands
# Deploy to specific regions
appmint deploy --regions=us-east-1,eu-west-1
# Deploy with regional preferences
appmint deploy --primary-region=us-east-1 --secondary-regions=eu-west-1,ap-southeast-1
# Deploy with disaster recovery
appmint deploy --regions=us-east-1 --dr-regions=us-west-2
# Check regional deployment status
appmint status --regions=all
# Scale specific regions
appmint scale --region=us-east-1 --replicas=5
Cross-Region Data Synchronization
# Database replication configuration
database:
replication:
# Primary region
primary: 'us-east-1'
# Read replicas
replicas:
- region: 'eu-west-1'
priority: 1
readOnly: true
- region: 'ap-southeast-1'
priority: 2
readOnly: true
# Synchronization settings
sync:
mode: 'asynchronous' # or 'synchronous'
lag_tolerance: '1s'
conflict_resolution: 'timestamp'
# File storage replication
storage:
replication:
strategy: 'multi-region'
regions: ['us-east-1', 'eu-west-1', 'ap-southeast-1']
consistency: 'eventual'
sync_interval: '5m'
Environment Management
Environment Configuration
Manage different deployment environments with isolated configurations.
# Environment definitions
environments:
development:
description: "Local development environment"
auto_deploy: false
resources:
cpu: '100m'
memory: '256Mi'
replicas: 1
staging:
description: "Staging environment for testing"
auto_deploy: true
trigger:
branch: 'develop'
resources:
cpu: '500m'
memory: '512Mi'
replicas: 2
domains:
- 'staging.myapp.com'
production:
description: "Production environment"
auto_deploy: false
approval_required: true
approvers:
- 'tech-lead@company.com'
- 'devops@company.com'
resources:
cpu: '1000m'
memory: '1Gi'
replicas: 5
domains:
- 'myapp.com'
- 'www.myapp.com'
Environment Variables Management
# Set environment variables
appmint env:set DATABASE_URL=postgres://... --env=production
appmint env:set API_KEY=secret123 --env=production --secret
# List environment variables
appmint env:list --env=production
# Copy environment variables between environments
appmint env:copy --from=staging --to=production
# Import from .env file
appmint env:import .env.production --env=production
# Export environment variables
appmint env:export --env=production --format=json
Environment Promotion
# Promote staging build to production
appmint promote --from=staging --to=production
# Promote specific build version
appmint promote --build=build-123 --to=production
# Promote with approval workflow
appmint promote --from=staging --to=production --require-approval
CI/CD Integration
GitHub Actions Integration
# .github/workflows/deploy.yml
name: Deploy to Appmint
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm test
- run: npm run lint
deploy-staging:
if: github.ref == 'refs/heads/develop'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: appmint/deploy-action@v1
with:
api-key: ${{ secrets.APPMINT_API_KEY }}
project-id: ${{ secrets.APPMINT_PROJECT_ID }}
environment: staging
deploy-production:
if: github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- uses: appmint/deploy-action@v1
with:
api-key: ${{ secrets.APPMINT_API_KEY }}
project-id: ${{ secrets.APPMINT_PROJECT_ID }}
environment: production
regions: us-east-1,eu-west-1
auto-promote: false
GitLab CI/CD Integration
# .gitlab-ci.yml
stages:
- test
- build
- deploy
variables:
APPMINT_CLI_VERSION: "latest"
test:
stage: test
image: node:18
script:
- npm ci
- npm test
- npm run lint
build:
stage: build
image: node:18
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
deploy-staging:
stage: deploy
image: appmint/cli:$APPMINT_CLI_VERSION
script:
- appmint deploy --env=staging
only:
- develop
deploy-production:
stage: deploy
image: appmint/cli:$APPMINT_CLI_VERSION
script:
- appmint deploy --env=production --regions=us-east-1,eu-west-1
when: manual
only:
- main
Custom CI/CD Pipeline
#!/bin/bash
# deploy.sh - Custom deployment script
set -e
# Configuration
PROJECT_ID="your-project-id"
ENVIRONMENT=${1:-staging}
REGIONS=${2:-"us-east-1"}
echo "🚀 Starting deployment to $ENVIRONMENT..."
# Run tests
echo "🧪 Running tests..."
npm test
# Build application
echo "🔨 Building application..."
npm run build
# Deploy to Appmint
echo "📦 Deploying to Appmint..."
appmint deploy \
--env=$ENVIRONMENT \
--regions=$REGIONS \
--wait \
--timeout=600
# Run post-deployment tests
echo "✅ Running post-deployment tests..."
npm run test:e2e
# Send notification
echo "📬 Sending deployment notification..."
curl -X POST https://api.slack.com/v1/webhook/... \
-d "payload={\"text\":\"✅ Successfully deployed $PROJECT_ID to $ENVIRONMENT\"}"
echo "🎉 Deployment complete!"
Monitoring & Observability
Deployment Monitoring
Monitor deployment health and performance in real-time.
# Monitoring configuration
monitoring:
metrics:
# Application metrics
- name: 'response_time'
threshold: '500ms'
severity: 'warning'
- name: 'error_rate'
threshold: '1%'
severity: 'critical'
- name: 'throughput'
threshold: '100 rps'
severity: 'info'
# Infrastructure metrics
- name: 'cpu_usage'
threshold: '80%'
severity: 'warning'
- name: 'memory_usage'
threshold: '85%'
severity: 'warning'
- name: 'disk_usage'
threshold: '90%'
severity: 'critical'
alerts:
# Notification channels
slack:
webhook: 'https://hooks.slack.com/...'
channel: '#alerts'
email:
recipients: ['team@company.com']
pagerduty:
integration_key: 'your-key'
dashboards:
- name: 'Application Performance'
panels:
- 'Response Time Trends'
- 'Error Rate by Region'
- 'Throughput Distribution'
- name: 'Infrastructure Health'
panels:
- 'Resource Utilization'
- 'Auto-scaling Events'
- 'Regional Load Distribution'
Deployment Logs
# View deployment logs
appmint logs:deployment --deployment=dep-123
# Stream live deployment logs
appmint logs:deployment --deployment=dep-123 --follow
# View application logs by region
appmint logs --region=us-east-1 --lines=100
# Search logs
appmint logs --search="ERROR" --since=1h
# Export logs
appmint logs:export --start="2024-01-01" --end="2024-01-31" --format=json
Performance Metrics
// Custom metrics collection
const { collectMetric } = require('@appmint/metrics');
// Collect custom application metrics
collectMetric('user_signup', {
value: 1,
tags: {
region: process.env.APPMINT_REGION,
version: process.env.APP_VERSION
}
});
// Performance timing
const startTime = Date.now();
await processOrder(orderData);
const duration = Date.now() - startTime;
collectMetric('order_processing_time', {
value: duration,
unit: 'milliseconds',
tags: {
order_type: orderData.type,
region: process.env.APPMINT_REGION
}
});
Rollback & Recovery
Automatic Rollback
Configure automatic rollback conditions to maintain application reliability.
# Rollback configuration
rollback:
enabled: true
# Automatic rollback triggers
triggers:
- metric: 'error_rate'
threshold: '5%'
window: '5m'
- metric: 'response_time'
threshold: '2s'
window: '10m'
- metric: 'success_rate'
threshold: '95%'
window: '5m'
# Rollback settings
strategy: 'immediate' # or 'gradual'
notification:
slack: true
email: true
webhook: 'https://your-app.com/webhooks/rollback'
# Post-rollback actions
actions:
- 'run_health_checks'
- 'notify_team'
- 'create_incident'
Manual Rollback
# List deployment history
appmint deployments:list --env=production
# Rollback to previous deployment
appmint rollback --env=production
# Rollback to specific deployment
appmint rollback --env=production --deployment=dep-456
# Rollback specific regions
appmint rollback --env=production --regions=us-east-1
# Gradual rollback (canary in reverse)
appmint rollback --env=production --strategy=gradual --steps=25,50,100
Disaster Recovery
# Disaster recovery configuration
disaster_recovery:
# Backup regions
backup_regions:
- 'us-west-2'
- 'eu-central-1'
# Recovery time objectives
rto: '15m' # Recovery Time Objective
rpo: '5m' # Recovery Point Objective
# Automated failover
failover:
enabled: true
health_check_failures: 3
detection_window: '2m'
# Recovery procedures
recovery:
database:
strategy: 'point_in_time_recovery'
backup_retention: '30d'
storage:
strategy: 'cross_region_replication'
application:
strategy: 'automated_deployment'
Security & Compliance
Secure Deployments
# Security configuration
security:
# Network security
network:
encryption_in_transit: true
private_networking: true
firewall_rules:
- port: 80
protocol: 'HTTP'
redirect_to_https: true
- port: 443
protocol: 'HTTPS'
sources: ['0.0.0.0/0']
# Container security
container:
security_scanning: true
vulnerability_threshold: 'HIGH'
base_image_updates: 'auto'
non_root_user: true
# Secrets management
secrets:
encryption: 'AES-256'
rotation: 'automatic'
access_logging: true
# Compliance
compliance:
soc2: true
gdpr: true
hipaa: false # Enable for healthcare apps
Access Control
# Manage deployment permissions
appmint access:grant user@company.com --role=deployer --env=staging
appmint access:grant team@company.com --role=viewer --env=production
# List access permissions
appmint access:list --env=production
# Revoke access
appmint access:revoke user@company.com --env=production
# Audit access logs
appmint audit:deployments --start="2024-01-01" --format=json
Cost Optimization
Resource Optimization
# Cost optimization settings
optimization:
# Auto-scaling efficiency
scaling:
scale_down_delay: '5m'
scale_up_threshold: '70%'
scale_down_threshold: '30%'
# Spot instances (where available)
spot_instances:
enabled: true
max_percentage: '50%'
fallback_to_on_demand: true
# Resource right-sizing
right_sizing:
enabled: true
analysis_window: '7d'
recommendation_threshold: '20%'
# Scheduled scaling
scheduled_scaling:
- name: 'business_hours'
schedule: '0 9 * * 1-5' # 9 AM Mon-Fri
replicas: 10
- name: 'off_hours'
schedule: '0 18 * * 1-5' # 6 PM Mon-Fri
replicas: 3
Cost Monitoring
# View deployment costs
appmint costs --env=production --period=month
# Cost breakdown by region
appmint costs:breakdown --by=region
# Set cost alerts
appmint costs:alert --threshold=1000 --period=month --email=billing@company.com
# Cost optimization recommendations
appmint costs:optimize --env=production
Best Practices
Deployment Checklist
Pre-Deployment:
- ✅ Run comprehensive tests (unit, integration, e2e)
- ✅ Perform security scanning
- ✅ Update documentation
- ✅ Review environment configurations
- ✅ Backup critical data
- ✅ Notify stakeholders
During Deployment:
- ✅ Monitor deployment progress
- ✅ Watch application metrics
- ✅ Verify health checks pass
- ✅ Test critical user journeys
- ✅ Monitor error rates
Post-Deployment:
- ✅ Verify application functionality
- ✅ Check performance metrics
- ✅ Monitor for errors or issues
- ✅ Update monitoring dashboards
- ✅ Document any issues or learnings
Configuration Management
# Best practices for configuration
configuration:
# Use environment variables for dynamic config
environment_variables:
sensitive_data: 'use_secrets_management'
environment_specific: 'use_env_vars'
build_time_constants: 'use_build_args'
# Version control all configurations
version_control:
config_files: 'include_in_repo'
secrets: 'never_commit'
environment_templates: 'use_templates'
# Validation and testing
validation:
schema_validation: true
dry_run_deployments: true
configuration_tests: true
Ready to deploy your application globally? Start with our quick deployment guide and scale to millions of users worldwide.
Deploy Your First App → View Deployment Examples → Join DevOps Community →