wheels deploy stop
Stop deployed containers on servers.
Synopsis
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
Stop containers on specific servers
Stop and remove containers
Force stop without confirmation
Stop and remove on specific server
How It Works
The stop command:
Connects to target servers via SSH
Navigates to the deployment directory (
/opt/{serviceName}
)Executes
docker compose stop
(ordocker compose down
with --remove)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
Use Cases
Temporary maintenance
Troubleshooting
Complete removal
Emergency stop
Best Practices
Confirm before stopping: Always verify servers unless using --force
Check status first: Run
wheels deploy:status
before stoppingUse --remove carefully: This permanently removes containers and volumes
Document stops: Keep track of why containers were stopped
Plan restarts: Know how to restart containers quickly
Test in staging: Practice stop/start procedures in non-production
Container Management
Restart stopped containers
Check container status
Clean up old images
Troubleshooting
Containers won't stop
Check for hung processes inside containers
Use
docker ps
directly on the serverMay 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 existsCheck 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
wheels deploy:push - Deploy/restart application
wheels deploy:status - Check deployment status
wheels deploy:logs - View container logs
Last updated
Was this helpful?