Gracefully stops running DevLake services without removing containers, volumes, or state.
gh devlake stop [flags]Auto-detects deployment type from state files in the current directory.
| Flag | Default | Description |
|---|---|---|
--service <name> |
(all) | Stop only a specific service (e.g., grafana) |
--local |
false |
Force local (Docker Compose) stop mode |
--azure |
false |
Force Azure stop mode |
--state-file <path> |
(auto-detected) | Path to state file |
Without --local or --azure, the command checks:
--state-filepath (if provided).devlake-azure.json→ Azure mode.devlake-local.json→ Local modedocker-compose.ymlin current directory → Local mode
If no deployment is detected, an error is returned — use gh devlake deploy to create a new deployment.
Runs docker compose stop from the deployment directory. This is non-destructive:
- Containers are stopped but not removed
- Volumes and data are preserved
- A quick restart is possible with
gh devlake start
gh devlake stop
gh devlake stop --service grafanaWhat it does:
- Checks Docker availability
- Runs
docker compose stop(with optional service filter) - Confirms containers are stopped
Data preserved: Unlike
gh devlake cleanup,stopdoes not remove containers or volumes. Your data (database, Grafana dashboards) remains intact.
Reads container names and resource group from .devlake-azure.json and stops running resources.
gh devlake stop --azure
gh devlake stop --azure --service backendWhat it does:
- Reads resource group and container names from
.devlake-azure.json - Checks Azure CLI login
- Stops each Container Instance via
az container stop - Stops the MySQL flexible server (when stopping all services)
gh devlake stop --jsonReturns:
{"status": "stopped", "mode": "local"}# Auto-detect and stop all services
gh devlake stop
# Stop only Grafana (local)
gh devlake stop --service grafana
# Force Azure mode
gh devlake stop --azure
# Use a specific state file
gh devlake stop --state-file /path/to/.devlake-azure.json| Command | Effect |
|---|---|
gh devlake start |
Bring stopped services back up (idempotent) |
gh devlake stop |
Pause services (non-destructive, data preserved) |
gh devlake cleanup |
Permanent teardown (removes containers, volumes, files) |
- start.md — bring services back up after stop
- status.md — check service health
- cleanup.md — permanent teardown
- day-2.md — day-2 operations overview