-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
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 todocker-compose.ymlin 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 thandeploy(~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 startfor each container - Wait for backend health
- Print endpoints
Key design decisions
- Uses
docker compose up -d(notdocker compose start) becauseup -dhandles 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
-
gh devlake startbrings up all services for a local deployment -
gh devlake start --service config-uirestarts only config-ui -
gh devlake startworks for Azure deployments (reads state file) - Health polling with appropriate timeout
-
--jsonoutput supported - Graceful error when no state file or docker-compose.yml found
-
gh devlake statusshows hint: "Rungh devlake start" when services are unhealthy
Dependencies
- Blocks:
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request