Lifecycle
These commands manage the full lifecycle of Docker Compose applications registered in the fleet registry.
fleet deploy
Full deployment pipeline: register the app if needed, build the Docker image, then start or restart the systemd service.
Usage
fleet deploy <app-dir> [--dry-run] [-y]Arguments
| Argument | Required | Description |
|---|---|---|
app-dir | Yes | Path to the directory containing docker-compose.yml |
Flags
| Flag | Description |
|---|---|
--dry-run | Show what would happen without making changes |
-y, --yes | Skip confirmation prompts |
Examples
$ fleet deploy /srv/myappDeploy PipelineBuilding myapp...✓ Build completeStarting myapp...✓ Deployed myapp$ fleet deploy /srv/myapp --dry-runDeploy PipelineWould build and deploy myapp! Dry run - no changes madeWhat deploy does
- If the app is not registered, runs
fleet add <app-dir>first - Runs
docker compose buildin the compose directory - If the systemd service is already active, restarts it; otherwise starts it
Related
- MCP tool:
fleet_deploy
fleet start
Start an app’s systemd service.
Usage
fleet start <app>Arguments
| Argument | Required | Description |
|---|---|---|
app | Yes | App name (as registered in the registry) |
Examples
$ fleet start myapp✓ Started myappRelated
- MCP tool:
fleet_start
fleet stop
Stop an app’s systemd service.
Usage
fleet stop <app>Arguments
| Argument | Required | Description |
|---|---|---|
app | Yes | App name |
Examples
$ fleet stop myapp✓ Stopped myappRelated
- MCP tool:
fleet_stop
fleet restart
Restart an app’s systemd service.
Usage
fleet restart <app>Arguments
| Argument | Required | Description |
|---|---|---|
app | Yes | App name |
Examples
$ fleet restart myapp✓ Restarted myappRelated
- MCP tool:
fleet_restart
fleet add
Register an existing Docker Compose app in the fleet registry without deploying or building it. Creates a systemd service unit if one does not already exist.
Usage
fleet add <app-dir> [--dry-run] [-y]Arguments
| Argument | Required | Description |
|---|---|---|
app-dir | Yes | Path to the directory containing docker-compose.yml |
Flags
| Flag | Description |
|---|---|
--dry-run | Show what would be registered without writing anything |
-y, --yes | Skip the confirmation prompt for creating a systemd service |
Examples
$ fleet add /srv/myappRegistering myapp from /srv/myappCompose path: /srv/myappFound containers: myapp-web-1, myapp-db-1✓ Registered myappFleet derives the app name from the directory name (lowercased, non-alphanumeric characters replaced with -). It looks for docker-compose.yml in the given directory or a server/ subdirectory.
fleet remove
Stop, disable, and deregister an app. The systemd service file is not deleted automatically.
Usage
fleet remove <app> [-y]Arguments
| Argument | Required | Description |
|---|---|---|
app | Yes | App name |
Flags
| Flag | Description |
|---|---|
-y, --yes | Skip the confirmation prompt |
Examples
$ fleet remove myapp? Remove myapp? This will stop and disable the service. (y/N) yStopping myapp...Disabling myapp...✓ Removed myapp from registry! Service file not deleted - remove manually if neededfleet init
Auto-discover all Docker Compose apps on the server and register them. Useful when first setting up fleet on a server with existing apps.
Usage
fleet initFleet scans common directories for docker-compose.yml files and calls fleet add for each one found.