Skip to content

Command Line Tools

wheels docker stop

Unified Docker stop command for Wheels apps. Stops containers locally or on remote servers.

Terminal window
wheels docker stop [options]

The wheels docker stop command halts running containers. It supports stopping containers locally or across multiple remote servers.

Centralized Configuration:

  • Source of Truth: This command prioritizes settings from config/deploy.yml for server lists and project names, ensuring you only stop the containers relevant to your current project.
OptionDescriptionDefault
--localStop containers on local machinefalse
--remoteStop containers on remote server(s)false
--serversSpecific servers to stop (defaults to config/deploy.yml)""
--removeContainerAlso remove the container after stoppingfalse

Stop Services Stops the running containers but keeps them (and their logs/state) intact.

Terminal window
wheels docker stop --local

Stop and Cleanup Stops the containers and removes them. This is useful for a full reset or to free up names.

Terminal window
wheels docker stop --local --removeContainer

Stop All Remote Servers Halts the application on all configured servers. Useful for maintenance windows.

Terminal window
wheels docker stop --remote

Stop Specific Servers Stops the application only on specific servers (e.g., taking a node out of rotation).

Terminal window
wheels docker stop --remote --servers=1

Full Remote Cleanup Stops and removes containers on remote servers.

Terminal window
wheels docker stop --remote --removeContainer
  1. Environment Detection: It checks for docker-compose.yml.
  2. Graceful Shutdown:
    • Docker Compose: Runs docker compose down. This stops and removes containers, networks, and volumes defined in the compose file.
    • Standard Docker: Runs docker stop [container_name]. This sends SIGTERM to the main process, allowing it to shut down gracefully.
  3. Removal (--removeContainer):
    • If using standard Docker, this flag triggers docker rm [container_name] after stopping.
    • If using Docker Compose, down already removes containers, so this flag is redundant but harmless.