wheels deploy init
Initialize deployment configuration for your Wheels application.
Synopsis
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
Initialize with custom servers
Initialize for DigitalOcean
Initialize with PostgreSQL and Adobe ColdFusion
Initialize for staging environment
Force overwrite existing configuration
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
Generated Dockerfile
For Lucee
For Adobe ColdFusion
Generated .env.deploy Template
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 settingsUpdate
.env.deploy
with production credentialsConfigure registry access (GitHub, Docker Hub, etc.)
Set up SSH access to your servers
Run
wheels deploy:setup
to provision serversRun
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 controlTest 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 deploymentUse 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
Last updated
Was this helpful?