When a service fails
The checkout branch of myapp breaks its API while the main branch keeps running. On the same branch you then make a typo in the project file and change it while the lane runs.
A failed service stays failed
Section titled “A failed service stays failed”On the branch, you add a line at the top of the API’s server that throws before the server listens.
throw new Error("checkout: the api is broken on this branch");$ devlanes restart api --no-ui$ devlanes statusThe restart waits for the API’s ready check, which never passes, so the API reads failed and lane 1 with it, while lane 0 on main keeps running. devlanes does not restart a failed service: it stays failed until you restart or stop it.
The log holds the reason
Section titled “The log holds the reason”$ devlanes debug errorsThis prints each failed unit with the end of its log, here the API’s stack trace pointing at the line you added. devlanes logs api shows the whole log.
You take the line out again. The API still reads failed, because devlanes runs the ready check when it starts a service and not later.
$ devlanes restart api --no-uiThis time the ready check passes and the API reads ready.
The project file is checked
Section titled “The project file is checked”You misspell the lane’s domain in the API’s hostname.
services: api: hosts: "api.${{ lane.domian }}"servicesLong-running processes of each lane, started together after infrastructure, setup and lane.start tasks. Each service gets its own port as PORT and, with hosts, HTTPS hostnames. A service that exits shows as failed and is not restarted.
services.<name>A long-running process started with the lane, such as a dev server or a worker. Each service gets its own port from the lane's block (PORT, ${{ self.port }}); devlanes stops it with the lane and never restarts it when it exits. A service needs run or run_script, directly or through extends.
services.<name>.hostsHostnames the devlanes HTTPS proxy routes to this service, so https://<host> reaches it. One entry or a list; an entry is a hostname or a mapping with host and optional port (a named port), fallback and host_header. A *. wildcard matches subdomains, and an exact host wins over it. The first non-wildcard host becomes public_url, non-wildcard hosts join the lane's DEVLANES_ORIGINS, and having hosts makes the default ready a TCP check. Keep them under ${{ lane.domain }} so lanes do not collide.
$ devlanes config checkThe check names the file, the line and the column, and suggests lane.domain. You fix the line.
A reload applies an edit
Section titled “A reload applies an edit”You give the API a log level.
services: api: env: LOG_LEVEL: debugservicesLong-running processes of each lane, started together after infrastructure, setup and lane.start tasks. Each service gets its own port as PORT and, with hosts, HTTPS hostnames. A service that exits shows as failed and is not restarted.
services.<name>A long-running process started with the lane, such as a dev server or a worker. Each service gets its own port from the lane's block (PORT, ${{ self.port }}); devlanes stops it with the lane and never restarts it when it exits. A service needs run or run_script, directly or through extends.
services.<name>.envEnvironment variables for this service's process. They override global_env and are overridden by the active profile's env and --env; values may be text, numbers, booleans or ${{ ... }} expressions. Setting PORT replaces the port devlanes allocated; a literal number is the same in every lane, so lanes collide.
services.<name>.env.<name>Environment variables for this service's process. They override global_env and are overridden by the active profile's env and --env; values may be text, numbers, booleans or ${{ ... }} expressions. Setting PORT replaces the port devlanes allocated; a literal number is the same in every lane, so lanes collide.
$ devlanes status$ devlanes reload --no-uiThe lane keeps running as it was, and its status says the config changed and names the API. The reload restarts the API alone, and the web app keeps running.
A start leaves running services alone and adds only those the lane lacks. A restart runs the services you name again from the file as it stands. A reload applies the difference between the file and what runs.
So far a person has typed every command. Next, a coding agent gets a worktree of its own and runs a lane there.