wheels deploy init
Initialize deployment configuration for your Wheels application.
Synopsis
Description
The wheels deploy init
command creates and configures deployment settings for your Wheels application. It generates deployment configuration files and sets up target environments.
Arguments
target
Deployment target name (production, staging, dev)
Interactive prompt
Options
--type
Deployment type (ssh, ftp, rsync, git, docker)
ssh
--host
Target host or server
Interactive prompt
--port
Connection port
22
(SSH), 21
(FTP)
--path
Remote deployment path
/var/www/html
--user
Remote user
Current user
--branch
Git branch to deploy
main
--strategy
Deployment strategy (rolling, blue-green, canary)
rolling
--keep-releases
Number of releases to keep
5
--force
Overwrite existing configuration
false
--help
Show help information
Examples
Interactive initialization
Initialize production target
Initialize with Git deployment
Initialize Docker deployment
Initialize with specific strategy
What It Does
Creates deployment configuration:
.wheels-deploy.json
in project rootTarget-specific settings
Deployment credentials (encrypted)
Sets up deployment structure:
Release directories
Shared directories (uploads, logs)
Symbolic links
Configures deployment hooks:
Pre-deployment tasks
Post-deployment tasks
Rollback procedures
Validates configuration:
Tests connection to target
Verifies permissions
Checks dependencies
Configuration Structure
Generated .wheels-deploy.json
:
Deployment Types
SSH Deployment
Secure shell access
Rsync for file transfer
Full control over deployment
FTP Deployment
Legacy support
Simple file transfer
Limited automation
Git Deployment
Git-based workflows
Post-receive hooks
Version control integration
Docker Deployment
Container orchestration
Image-based deployment
Scalable infrastructure
Shared Resources
Shared directories and files persist across deployments:
Directories: User uploads, logs, cache
Files: Environment configs, secrets
Deployment Hooks
Pre-deployment
Build assets
Run tests
Backup database
Post-deployment
Run migrations
Clear caches
Restart services
Send notifications
Rollback
Restore previous release
Revert database
Clear caches
Interactive Mode
When run without arguments, the command enters interactive mode:
Security Considerations
Credentials: Stored encrypted in config
SSH Keys: Recommended over passwords
Permissions: Least privilege principle
Secrets: Use environment variables
Use Cases
New Project: Set up deployment pipeline
Migration: Move from manual to automated deployment
Multi-Environment: Configure staging and production
Team Setup: Share deployment configuration
Notes
Run from project root directory
Requires appropriate server access
Test with staging environment first
Back up existing configuration before overwriting
See Also
Last updated
Was this helpful?