CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
wheels deploy init (Coming Soon)
This command may not work as expected. A complete and stable version is coming soon.
Initialize deployment configuration for your Wheels application.
Synopsis
wheels deploy:init [options]
Description
The wheels deploy:init
command creates a deployment configuration file (deploy.json
), generates a Dockerfile, and sets up environment templates for deploying your Wheels application using Docker and container orchestration.
Options
provider=<string>
- Cloud provider: digitalocean, aws, linode, custom (default: custom)servers=<string>
- Comma-separated list of server IPs for custom providerdomain=<string>
- Primary domain for the applicationapp-name=<string>
- Application name for deploymentdb=<string>
- Database type: mysql, postgres, mssql (default: mysql)cfengine=<string>
- CF engine: lucee, adobe (default: lucee)environment=<string>
- Environment name (creates deploy.{environment}.json)--force
- Overwrite existing deploy.json (default: false)
Examples
Interactive initialization
wheels deploy:init
Initialize with custom servers
wheels deploy:init provider=custom servers=192.168.1.100,192.168.1.101 domain=myapp.com
Initialize for DigitalOcean
wheels deploy:init provider=digitalocean domain=myapp.com app-name=myapp
Initialize with PostgreSQL and Adobe ColdFusion
wheels deploy:init db=postgres cfengine=adobe domain=myapp.com
Initialize for staging environment
wheels deploy:init environment=staging servers=staging.example.com
Force overwrite existing configuration
wheels deploy:init --force domain=myapp.com
What It Does
The init command creates three key files:
-
deploy.json (or deploy.{environment}.json):
- Docker registry configuration
- Server list and SSH settings
- Environment variables
- Health check configuration
- Database and Traefik settings
-
Dockerfile:
- Base image for your CF engine (Lucee/Adobe)
- Application dependencies
- CommandBox installation
- Port configuration
-
.env.deploy:
- Environment variable template
- Database credentials placeholder
- Generated secret key
- Production settings
Generated deploy.json Structure
{
"service": "myapp",
"image": "myapp",
"servers": {
"web": ["192.168.1.100", "192.168.1.101"]
},
"registry": {
"server": "ghcr.io",
"username": "your-github-username"
},
"env": {
"clear": {
"CFENGINE": "lucee",
"DB_TYPE": "mysql",
"WHEELS_ENV": "production"
},
"secret": [
"DB_PASSWORD",
"WHEELS_RELOAD_PASSWORD",
"SECRET_KEY_BASE"
]
},
"ssh": {
"user": "root"
},
"builder": {
"multiarch": false
},
"healthcheck": {
"path": "/",
"port": 3000,
"interval": 30
},
"accessories": {
"db": {
"image": "mysql:8",
"host": "db",
"port": 3306,
"env": {
"clear": {},
"secret": []
},
"volumes": [
"/var/lib/mysql:/var/lib/mysql"
]
}
},
"traefik": {
"enabled": true,
"options": {
"publish": ["443:443"],
"volume": []
},
"args": {
"entryPoints.web.address": ":80",
"entryPoints.websecure.address": ":443",
"certificatesresolvers.letsencrypt.acme.email": "admin@myapp.com"
},
"labels": {
"traefik.http.routers.myapp.rule": "Host(`myapp.com`)",
"traefik.http.routers.myapp.entrypoints": "websecure",
"traefik.http.routers.myapp.tls.certresolver": "letsencrypt"
}
}
}
Generated Dockerfile
For Lucee
FROM lucee/lucee:5.4
# Install additional dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /var/www
# Copy application files
COPY . /var/www/
# Install CommandBox for dependency management
RUN curl -fsSl https://downloads.ortussolutions.com/debs/gpg | apt-key add -
RUN echo "deb https://downloads.ortussolutions.com/debs/noarch /" | tee -a /etc/apt/sources.list.d/commandbox.list
RUN apt-get update && apt-get install -y commandbox
# Install dependencies
RUN box install
# Configure Lucee
COPY deploy/lucee-config.xml /opt/lucee/web/lucee-web.xml.cfm
# Expose port
EXPOSE 3000
# Start command
CMD ["box", "server", "start", "--console", "--force", "port=3000"]
For Adobe ColdFusion
FROM adobecoldfusion/coldfusion:latest
# Set working directory
WORKDIR /app
# Copy application files
COPY . /app/
# Install CommandBox
RUN curl -fsSl https://www.ortussolutions.com/parent/download/commandbox/type/bin -o /tmp/box && \
chmod +x /tmp/box && \
mv /tmp/box /usr/local/bin/box
# Install dependencies
RUN box install
# Expose port
EXPOSE 3000
# Start command
CMD ["box", "server", "start", "--console", "--force", "cfengine=adobe2023", "port=3000"]
Generated .env.deploy Template
# Production Environment Variables
DB_HOST=db
DB_PORT=3306
DB_NAME=myapp_production
DB_USERNAME=myapp_user
DB_PASSWORD=change_me_to_secure_password
WHEELS_ENV=production
WHEELS_RELOAD_PASSWORD=change_me_to_secure_password
SECRET_KEY_BASE=<64-character-generated-key>
# Additional configuration
APP_URL=https://myapp.com
Database Configuration
The command configures database accessories based on your selection:
MySQL
- Image: mysql:8
- Port: 3306
- Volume: /var/lib/mysql
PostgreSQL
- Image: postgres:15
- Port: 5432
- Volume: /var/lib/postgresql
SQL Server
- Image: mcr.microsoft.com/mssql/server:2022-latest
- Port: 1433
- Volume: /var/lib/mssql
Traefik Configuration
Automatic HTTPS with Let's Encrypt:
- HTTP to HTTPS redirection
- Automatic SSL certificate generation
- Domain-based routing
- WebSocket support
Interactive Mode
When parameters are not provided, the command prompts for:
- Application name (reads from server.json if available)
- Primary domain
- Server IPs (for custom provider)
Next Steps
After running init:
- Review and update
deploy.json
with your settings - Update
.env.deploy
with production credentials - Configure registry access (GitHub, Docker Hub, etc.)
- Set up SSH access to your servers
- Run
wheels deploy:setup
to provision servers - Run
wheels deploy:push
to deploy
Best Practices
- Use environment-specific configs: Create separate configs for staging/production
- Secure credentials: Never commit
.env.deploy
to version control - Test locally first: Build and run Docker image locally
- Use SSH keys: Configure passwordless SSH access
- Configure health checks: Ensure your app has a working health endpoint
Security Notes
- Generated secret keys are cryptographically random
- Passwords in
.env.deploy
must be changed before deployment - Use secrets management for production credentials
- Configure firewall rules on target servers
- Use read-only filesystem where possible
See Also
- wheels deploy:setup - Setup deployment environment
- wheels deploy:push - Deploy application
- wheels deploy:secrets - Manage deployment secrets
- Synopsis
- Options
- Examples
- Interactive initialization
- Initialize with custom servers
- Initialize for DigitalOcean
- Initialize with PostgreSQL and Adobe ColdFusion
- Initialize for staging environment
- Force overwrite existing configuration
- What It Does
- Generated deploy.json Structure
- Generated Dockerfile
- For Lucee
- For Adobe ColdFusion
- Generated .env.deploy Template
- Database Configuration
- MySQL
- PostgreSQL
- SQL Server
- Traefik Configuration
- Interactive Mode
- Next Steps
- Best Practices
- Security Notes
- See Also