LogoLogo
HomeAPIBlog
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
  • INTRODUCTION
    • Getting Started
      • Running Local Development Servers
      • Beginner Tutorial: Hello World
      • Beginner Tutorial: Hello Database
      • Tutorial: Wheels, AJAX, and You
    • Frameworks and Wheels
    • Requirements
    • Manual Installation
    • Upgrading
    • Screencasts
  • Command Line Tools
    • CLI Overview
    • Quick Start Guide
    • Command Reference
      • Core Commands
        • wheels init
        • wheels info
        • wheels reload
        • wheels deps
        • wheels destroy
        • wheels watch
      • Code Generation
        • 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
      • Database Commands
        • 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 db schema
        • wheels db seed
      • Testing Commands
        • wheels test
        • wheels test run
        • wheels test coverage
        • wheels test debug
      • Configuration Commands
        • wheels config list
        • wheels config set
        • wheels config env
      • Environment Management
        • wheels env
        • wheels env setup
        • wheels env list
        • wheels env switch
      • Plugin Management
        • wheels plugins
        • wheels plugins list
        • wheels plugins install
        • wheels plugins remove
      • Code Analysis
        • wheels analyze
        • wheels analyze code
        • wheels analyze performance
        • wheels analyze security
      • Security Commands
        • wheels security
        • wheels security scan
      • Performance Commands
        • wheels optimize
        • wheels optimize performance
      • Documentation Commands
        • wheels docs
        • wheels docs generate
        • wheels docs serve
      • CI/CD Commands
        • wheels ci init
      • Docker Commands
        • wheels docker init
        • wheels docker deploy
      • Deployment Commands
        • 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
    • CLI Development Guides
      • Creating Commands
      • Service Architecture
      • Migrations Guide
      • Testing Guide
  • Working with Wheels
    • Conventions
    • Configuration and Defaults
    • Directory Structure
    • Switching Environments
    • Testing Your Application
    • Using the Test Environment
    • Contributing to Wheels
    • Submitting Pull Requests
    • Documenting your Code
  • Handling Requests with Controllers
    • Request Handling
    • Rendering Content
    • Redirecting Users
    • Sending Files
    • Sending Email
    • Responding with Multiple Formats
    • Using the Flash
    • Using Filters
    • Verification
    • Event Handlers
    • Routing
    • URL Rewriting
      • Apache
      • IIS
      • Tomcat
      • Nginx
    • Obfuscating URLs
    • Caching
    • Nesting Controllers
    • CORS Requests
  • Displaying Views to Users
    • Pages
    • Partials
    • Linking Pages
    • Layouts
    • Form Helpers and Showing Errors
    • Displaying Links for Pagination
    • Date, Media, and Text Helpers
    • Creating Custom View Helpers
    • Localization
  • Database Interaction Through Models
    • 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
    • Database Migrations
      • Migrations in Production
    • Using Multiple Data Sources
  • Plugins
    • Installing and Using Plugins
    • Developing Plugins
    • Publishing Plugins
  • Project Documentation
    • Overview
  • External Links
    • Source Code
    • Issue Tracker
    • Sponsor Us
    • Community
Powered by GitBook
LogoLogo
On this page
  • Synopsis
  • Description
  • Subcommands
  • Options
  • Examples
  • View deployment help
  • Initialize deployment
  • Execute deployment
  • Check deployment status
  • Deployment Workflow
  • Configuration
  • Deployment Strategies
  • Rolling Deployment
  • Blue-Green Deployment
  • Canary Deployment
  • Environment Variables
  • Use Cases
  • Best Practices
  • Notes
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Deployment Commands

wheels deploy

Base command for deployment operations in Wheels applications.

Synopsis

wheels deploy [subcommand] [options]

Description

The wheels deploy command provides a comprehensive deployment system for Wheels applications. It manages the entire deployment lifecycle including initialization, execution, monitoring, and rollback capabilities.

Subcommands

Command
Description

audit

Audit deployment configuration and security

exec

Execute a deployment

hooks

Manage deployment hooks

init

Initialize deployment configuration

lock

Lock deployment state

logs

View deployment logs

proxy

Configure deployment proxy

push

Push deployment to target

rollback

Rollback to previous deployment

secrets

Manage deployment secrets

setup

Setup deployment environment

status

Check deployment status

stop

Stop active deployment

Options

Option
Description

--help

Show help information

--version

Show version information

Examples

View deployment help

wheels deploy --help

Initialize deployment

wheels deploy init

Execute deployment

wheels deploy exec production

Check deployment status

wheels deploy status

Deployment Workflow

  1. Initialize: Set up deployment configuration

    wheels deploy init
  2. Setup: Prepare deployment environment

    wheels deploy setup production
  3. Configure: Set secrets and proxy settings

    wheels deploy secrets set DB_PASSWORD
    wheels deploy proxy configure
  4. Deploy: Push and execute deployment

    wheels deploy push
    wheels deploy exec
  5. Monitor: Check status and logs

    wheels deploy status
    wheels deploy logs --follow
  6. Rollback (if needed):

    wheels deploy rollback

Configuration

Deployment configuration is stored in .wheels-deploy.json:

{
  "targets": {
    "production": {
      "host": "prod.example.com",
      "path": "/var/www/app",
      "branch": "main",
      "hooks": {
        "pre-deploy": ["npm run build"],
        "post-deploy": ["wheels dbmigrate latest"]
      }
    },
    "staging": {
      "host": "staging.example.com",
      "path": "/var/www/staging",
      "branch": "develop"
    }
  },
  "defaults": {
    "strategy": "rolling",
    "keepReleases": 5
  }
}

Deployment Strategies

Rolling Deployment

  • Zero-downtime deployment

  • Gradual rollout

  • Automatic rollback on failure

Blue-Green Deployment

  • Two identical environments

  • Instant switching

  • Easy rollback

Canary Deployment

  • Gradual traffic shifting

  • Risk mitigation

  • Performance monitoring

Environment Variables

Variable
Description

WHEELS_DEPLOY_TARGET

Default deployment target

WHEELS_DEPLOY_STRATEGY

Default deployment strategy

WHEELS_DEPLOY_TIMEOUT

Deployment timeout in seconds

Use Cases

  1. Continuous Deployment: Automated deployments from CI/CD

  2. Manual Releases: Controlled production deployments

  3. Multi-Environment: Deploy to staging, production, etc.

  4. Disaster Recovery: Quick rollback capabilities

  5. Scheduled Deployments: Deploy during maintenance windows

Best Practices

  1. Always run deploy audit before production deployments

  2. Use deploy lock during critical operations

  3. Configure proper hooks for migrations and cache clearing

  4. Keep deployment logs for auditing

  5. Test deployments in staging first

  6. Use secrets management for sensitive data

Notes

  • Requires SSH access for remote deployments

  • Git repository must be properly configured

  • Database backups recommended before deployment

  • Monitor application health after deployment

See Also

PreviousDeployment CommandsNextwheels deploy audit

Last updated 2 days ago

Was this helpful?

- Initialize deployment

- Execute deployment

- Rollback deployment

- Docker deployments

wheels deploy init
wheels deploy exec
wheels deploy rollback
wheels docker deploy