wheels env setup
Setup a new environment configuration for your Wheels application.
Synopsis
Description
The wheels env setup
command creates and configures new environments for your Wheels application. It generates environment-specific configuration files, database settings, and initializes the environment structure.
Arguments
name
Environment name (e.g., staging, qa, production)
Required
Options
--base
Base environment to copy from
development
--database
Database name
wheels_[name]
--datasource
CF datasource name
wheels_[name]
--debug
Enable debug mode
false
--cache
Enable caching
Based on name
--reload-password
Password for reload
Random
--skip-database
Skip database creation
false
--force
Overwrite existing environment
false
--help
Show help information
Examples
Setup basic environment
Setup with custom database
Copy from production settings
Setup with specific options
Skip database setup
What It Does
Creates Configuration Directory:
Generates Settings File:
Database configuration
Environment-specific settings
Debug and cache options
Security settings
Sets Up Database (unless skipped):
Creates database
Configures datasource
Tests connection
Updates Environment Registry:
Adds to available environments
Sets up environment detection
Generated Configuration
Example config/staging/settings.cfm
:
Environment Types
Development
Full debugging
No caching
Detailed errors
Hot reload
Testing
Test database
Debug enabled
Isolated data
Fast cleanup
Staging
Production-like
Some debugging
Performance testing
Pre-production validation
Production
No debugging
Full caching
Error handling
Optimized performance
Custom
Create specialized environments:
Database Configuration
Automatic Setup
Custom Database
Database URL
Environment Variables
The command sets up support for:
Configuration Inheritance
Environments can inherit settings:
Validation
After setup, the command validates:
Configuration file syntax
Database connectivity
Directory permissions
Environment detection
Environment Detection
Configure how environment is detected:
Best Practices
Naming Convention: Use clear, consistent names
Base Selection: Choose appropriate base environment
Security: Use strong reload passwords
Documentation: Document environment purposes
Testing: Test configuration before use
Advanced Configuration
Multiple Databases
Load Balancing
Feature Flags
Troubleshooting
Database Creation Failed
Check database permissions
Verify connection settings
Use
--skip-database
and create manually
Configuration Errors
Check syntax in settings.cfm
Verify file permissions
Review error logs
Environment Not Detected
Check environment.cfm logic
Verify server variables
Test detection rules
Migration
From Existing Environment
Use Cases
Multi-Stage Pipeline: dev → staging → production
Feature Testing: Isolated feature environments
Performance Testing: Dedicated performance environment
Client Demos: Separate demo environments
A/B Testing: Multiple production variants
Notes
Environment names should be lowercase
Avoid spaces in environment names
Each environment needs unique database
Restart application after setup
Test thoroughly before using
See Also
Last updated
Was this helpful?