Environment Management
Easy Deploy allows you to manage multiple environments for your applications, enabling smooth development workflows from development to production.
Environment Types
Section titled “Environment Types”Development Environment
Section titled “Development Environment”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
Staging Environment
Section titled “Staging Environment”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
Production Environment
Section titled “Production Environment”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
Creating Environments
Section titled “Creating Environments”Via Dashboard
Section titled “Via Dashboard”- Navigate to your application dashboard
- Click “Environments” in the sidebar
- Click “Create New Environment”
- Configure environment settings:
- Name: Environment identifier
- Branch: Git branch to deploy
- Subdomain: Custom URL (e.g.,
staging.myapp.com) - Environment variables: Environment-specific configuration
Via API
Section titled “Via API”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/environmentsEnvironment Configuration
Section titled “Environment Configuration”Branch Mapping
Section titled “Branch Mapping”Configure which Git branches deploy to which environments:
- main/master → Production
- develop → Staging
- feature/ → Development
Auto-Deployment
Section titled “Auto-Deployment”Set up automatic deployments when code is pushed:
environments: production: branch: main auto_deploy: true
staging: branch: develop auto_deploy: true
development: branch: feature/* auto_deploy: trueEnvironment Variables
Section titled “Environment Variables”Set different values for each environment:
| Variable | Development | Staging | Production |
|---|---|---|---|
DATABASE_URL | dev-db | staging-db | prod-db |
API_URL | api-dev | api-staging | api.example.com |
LOG_LEVEL | debug | info | error |
Best Practices
Section titled “Best Practices”Development Workflow
Section titled “Development Workflow”- Feature branches for new development
- Pull requests for code review
- Merge to develop for staging testing
- Merge to main for production deployment
Environment Parity
Section titled “Environment Parity”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)
Security
Section titled “Security”- Separate credentials for each environment
- Limited access to production environment
- Audit logging for all environment changes
- Regular security updates across all environments
Monitoring Environments
Section titled “Monitoring Environments”Health Checks
Section titled “Health Checks”Set up health checks for each environment:
# DevelopmentGET https://dev.myapp.com/health
# StagingGET https://staging.myapp.com/health
# ProductionGET https://myapp.com/healthEnvironment Status
Section titled “Environment Status”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
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”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.