Summary
Add a gh devlake start command that brings up stopped/crashed DevLake services for an existing deployment. This fills a lifecycle gap — the CLI has deploy (initial setup) and cleanup (teardown) but no way to restart services after a reboot, crash, or stop.
Motivating scenario: After a machine reboot, gh devlake status shows ❌ for config-ui (container exited), but offers no remediation. Users must manually find the docker-compose directory and run raw Docker commands.
Proposed Solution
Local deployments (Docker Compose)
- Auto-detect deployment from state file (
.devlake-local.json) or fall back to docker-compose.yml in cwd
- Check Docker availability
- Run
docker compose up -d (idempotent — starts stopped containers, recreates exited ones, no-op for running ones)
- Wait for backend health (
/ping) with shorter timeout than deploy (~60s vs 6min — databases/volumes already exist)
- Print service URLs and health status
Azure deployments (Container Instances)
- Read container names + resource group from
.devlake-azure.json
- Check Azure CLI login
- Run
az container start for each container
- Wait for backend health
- Print endpoints
Key design decisions
- Uses
docker compose up -d (not docker compose start) because up -d handles both stopped AND crashed/exited containers
- Shorter health timeout since databases and volumes already initialized
- State file is NOT modified — Docker/Azure is the source of truth for runtime state
Flags
| Flag |
Default |
Description |
--service <name> |
(all) |
Start only a specific service (e.g., --service config-ui) |
--no-wait |
false |
Skip health polling after start |
--json |
false |
Machine-readable output |
Scope of Changes
| File |
Change |
cmd/start.go |
New command implementation |
cmd/deploy.go |
Register start in operate command group |
cmd/status.go |
Add remediation hint when services are unhealthy (see #97) |
docs/start.md |
New documentation |
docs/day-2.md |
Add start to operations list |
README.md |
Add to command reference table |
Acceptance Criteria
Dependencies
References
cmd/deploy_local.go — startLocalContainers() function contains reusable patterns
internal/docker/build.go — ComposeUp() already exists
internal/devlake/discovery.go — health polling and endpoint inference
Summary
Add a
gh devlake startcommand that brings up stopped/crashed DevLake services for an existing deployment. This fills a lifecycle gap — the CLI hasdeploy(initial setup) andcleanup(teardown) but no way to restart services after a reboot, crash, orstop.Motivating scenario: After a machine reboot,
gh devlake statusshows❌for config-ui (container exited), but offers no remediation. Users must manually find the docker-compose directory and run raw Docker commands.Proposed Solution
Local deployments (Docker Compose)
.devlake-local.json) or fall back todocker-compose.ymlin cwddocker compose up -d(idempotent — starts stopped containers, recreates exited ones, no-op for running ones)/ping) with shorter timeout thandeploy(~60s vs 6min — databases/volumes already exist)Azure deployments (Container Instances)
.devlake-azure.jsonaz container startfor each containerKey design decisions
docker compose up -d(notdocker compose start) becauseup -dhandles both stopped AND crashed/exited containersFlags
--service <name>--service config-ui)--no-waitfalse--jsonfalseScope of Changes
cmd/start.gocmd/deploy.gostartinoperatecommand groupcmd/status.godocs/start.mddocs/day-2.mdstartto operations listREADME.mdAcceptance Criteria
gh devlake startbrings up all services for a local deploymentgh devlake start --service config-uirestarts only config-uigh devlake startworks for Azure deployments (reads state file)--jsonoutput supportedgh devlake statusshows hint: "Rungh devlake start" when services are unhealthyDependencies
gh devlake stop(Fix temp directory leak in Azure fork deploy #97 — stop is the counterpart)References
cmd/deploy_local.go—startLocalContainers()function contains reusable patternsinternal/docker/build.go—ComposeUp()already existsinternal/devlake/discovery.go— health polling and endpoint inference