Skip to content

Environment Management

Easy Deploy allows you to manage multiple environments for your applications, enabling smooth development workflows from development to production.

Perfect for testing new features and experimenting with code changes.

  • Auto-deploy: Automatically deploys from your development branch
  • Debug mode: Enhanced logging and error reporting
  • Hot reload: Instant updates when code changes
  • Development databases: Isolated test data

Pre-production environment that mirrors your production setup.

  • Production parity: Same configuration as production
  • Integration testing: Test with real-like data and integrations
  • Performance testing: Load testing and optimization
  • User acceptance testing: Final validation before production

Your live application serving real users.

  • High availability: Redundant infrastructure and failover
  • Performance optimized: Caching, CDN, and optimization
  • Monitoring: Real-time alerts and performance tracking
  • Backup and recovery: Automated backups and disaster recovery
  1. Navigate to your application dashboard
  2. Click “Environments” in the sidebar
  3. Click “Create New Environment”
  4. Configure environment settings:
    • Name: Environment identifier
    • Branch: Git branch to deploy
    • Subdomain: Custom URL (e.g., staging.myapp.com)
    • Environment variables: Environment-specific configuration
Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "staging",
"branch": "develop",
"subdomain": "staging",
"auto_deploy": true
}' \
https://api.easydeploy.com/v1/applications/APP_ID/environments

Configure which Git branches deploy to which environments:

  • main/master → Production
  • develop → Staging
  • feature/ → Development

Set up automatic deployments when code is pushed:

.easydeploy.yml
environments:
production:
branch: main
auto_deploy: true
staging:
branch: develop
auto_deploy: true
development:
branch: feature/*
auto_deploy: true

Set different values for each environment:

VariableDevelopmentStagingProduction
DATABASE_URLdev-dbstaging-dbprod-db
API_URLapi-devapi-stagingapi.example.com
LOG_LEVELdebuginfoerror
  1. Feature branches for new development
  2. Pull requests for code review
  3. Merge to develop for staging testing
  4. Merge to main for production deployment

Keep environments as similar as possible:

  • Same operating system and runtime versions
  • Same dependencies and packages
  • Similar database schemas and data structure
  • Same environment variables (with different values)
  • Separate credentials for each environment
  • Limited access to production environment
  • Audit logging for all environment changes
  • Regular security updates across all environments

Set up health checks for each environment:

Terminal window
# Development
GET https://dev.myapp.com/health
# Staging
GET https://staging.myapp.com/health
# Production
GET https://myapp.com/health

Monitor the status of all environments from your dashboard:

  • Deployment status: Success, failed, in progress
  • Health status: Healthy, unhealthy, unknown
  • Performance metrics: Response time, error rate
  • Resource usage: CPU, memory, disk usage

Environment won’t deploy

  • Check branch permissions and access
  • Verify environment variables are set
  • Review build logs for errors

Differences between environments

  • Compare environment variable configurations
  • Check dependency versions
  • Verify infrastructure settings

Performance differences

  • Compare resource allocations
  • Check caching configurations
  • Review database performance

Need help? Check our troubleshooting guide or contact support.