Skip to content

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

Terminal window
fleet deploy <app-dir> [--dry-run] [-y]

Arguments

ArgumentRequiredDescription
app-dirYesPath to the directory containing docker-compose.yml

Flags

FlagDescription
--dry-runShow what would happen without making changes
-y, --yesSkip confirmation prompts

Examples

Terminal window
$ fleet deploy /srv/myapp
Deploy Pipeline
Building myapp...
Build complete
Starting myapp...
Deployed myapp
Terminal window
$ fleet deploy /srv/myapp --dry-run
Deploy Pipeline
Would build and deploy myapp
! Dry run - no changes made

What deploy does

  1. If the app is not registered, runs fleet add <app-dir> first
  2. Runs docker compose build in the compose directory
  3. If the systemd service is already active, restarts it; otherwise starts it
  • MCP tool: fleet_deploy

fleet start

Start an app’s systemd service.

Usage

Terminal window
fleet start <app>

Arguments

ArgumentRequiredDescription
appYesApp name (as registered in the registry)

Examples

Terminal window
$ fleet start myapp
Started myapp
  • MCP tool: fleet_start

fleet stop

Stop an app’s systemd service.

Usage

Terminal window
fleet stop <app>

Arguments

ArgumentRequiredDescription
appYesApp name

Examples

Terminal window
$ fleet stop myapp
Stopped myapp
  • MCP tool: fleet_stop

fleet restart

Restart an app’s systemd service.

Usage

Terminal window
fleet restart <app>

Arguments

ArgumentRequiredDescription
appYesApp name

Examples

Terminal window
$ fleet restart myapp
Restarted myapp
  • 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

Terminal window
fleet add <app-dir> [--dry-run] [-y]

Arguments

ArgumentRequiredDescription
app-dirYesPath to the directory containing docker-compose.yml

Flags

FlagDescription
--dry-runShow what would be registered without writing anything
-y, --yesSkip the confirmation prompt for creating a systemd service

Examples

Terminal window
$ fleet add /srv/myapp
Registering myapp from /srv/myapp
Compose path: /srv/myapp
Found containers: myapp-web-1, myapp-db-1
Registered myapp

Fleet 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

Terminal window
fleet remove <app> [-y]

Arguments

ArgumentRequiredDescription
appYesApp name

Flags

FlagDescription
-y, --yesSkip the confirmation prompt

Examples

Terminal window
$ fleet remove myapp
? Remove myapp? This will stop and disable the service. (y/N) y
Stopping myapp...
Disabling myapp...
Removed myapp from registry
! Service file not deleted - remove manually if needed

fleet 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

Terminal window
fleet init

Fleet scans common directories for docker-compose.yml files and calls fleet add for each one found.