Loading...

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 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

Ask or search...
Ctrl K
Loading...

deploy stop (Coming Soon)

This command may not work as expected. A complete and stable version is coming soon.

Stop deployed containers on servers.

Synopsis

wheels deploy:stop [options]

Description

The wheels deploy:stop command stops Docker containers on your deployment servers. It can either stop containers (keeping them for later restart) or completely remove them. This is useful for maintenance, troubleshooting, or decommissioning deployments.

Options

  • servers=<string> - Stop on specific servers (comma-separated list)
  • --remove - Remove containers after stopping (default: false)
  • --force - Skip confirmation prompt (default: false)

Examples

Stop containers on all servers

wheels deploy:stop

Stop containers on specific servers

wheels deploy:stop servers=web1.example.com,web2.example.com

Stop and remove containers

wheels deploy:stop --remove

Force stop without confirmation

wheels deploy:stop --force

Stop and remove on specific server

wheels deploy:stop servers=web1.example.com --remove --force

How It Works

The stop command:

  1. Connects to target servers via SSH
  2. Navigates to the deployment directory (/opt/{serviceName})
  3. Executes docker compose stop (or docker compose down with --remove)
  4. Optionally removes volumes with --remove flag

Stop vs Remove

Stop (default)

  • Stops running containers
  • Preserves container state and data
  • Containers can be restarted later
  • Uses docker compose stop

Remove (--remove flag)

  • Stops and removes containers
  • Removes container volumes
  • Complete cleanup of deployment
  • Uses docker compose down -v

Output Example

Wheels Deploy Stop
==================================================
WARNING: This will stop your application on the following servers:
web1.example.com, web2.example.com

Are you sure you want to continue? (yes/no): yes

Server: web1.example.com
------------------------------
Stopping containers...
✓ Containers stopped successfully

Server: web2.example.com
------------------------------
Stopping containers...
✓ Containers stopped successfully

Operation completed.

To restart: wheels deploy:push --no-build
To remove completely: wheels deploy:stop --remove

Use Cases

Temporary maintenance

# Stop containers for maintenance
wheels deploy:stop

# Perform maintenance tasks...

# Restart containers
wheels deploy:push --no-build

Troubleshooting

# Stop problematic server
wheels deploy:stop servers=web2.example.com

# Debug issue...

# Restart after fix
wheels deploy:push servers=web2.example.com --no-build

Complete removal

# Remove deployment completely
wheels deploy:stop --remove --force

Emergency stop

# Quick stop without prompts
wheels deploy:stop --force

Best Practices

  1. Confirm before stopping: Always verify servers unless using --force
  2. Check status first: Run wheels deploy:status before stopping
  3. Use --remove carefully: This permanently removes containers and volumes
  4. Document stops: Keep track of why containers were stopped
  5. Plan restarts: Know how to restart containers quickly
  6. Test in staging: Practice stop/start procedures in non-production

Container Management

Restart stopped containers

# Quick restart without rebuilding
wheels deploy:push --no-build --no-push

Check container status

# Verify containers are stopped
wheels deploy:status

Clean up old images

# After stopping, clean up disk space
wheels deploy:exec "docker image prune -f"

Troubleshooting

Containers won't stop

  • Check for hung processes inside containers
  • Use docker ps directly on the server
  • May need to use docker kill as last resort

Permission errors

  • Ensure SSH user has Docker permissions
  • Check if user is in docker group
  • Verify sudo access if needed

Restart issues

  • Ensure .env.deploy file still exists
  • Check if volumes were removed with --remove
  • Verify Docker daemon is running

Notes

  • Stop command uses Docker Compose commands
  • Confirmation prompt helps prevent accidental stops
  • Remove flag permanently deletes container data
  • Stopped containers retain their configuration
  • Works with the deployment structure created by deploy:init

See Also