Run a folder as two lanes
Use this when you want the same worktree running twice, for example against empty data or with other services, without making a second worktree.
Add the lane
Section titled “Add the lane”Run this in the folder. The new lane takes the lowest free lane number, such as lane 2 with hostnames under myapp2.localhost.
$ devlanes lane new --name reviewThe name is what you type to reach the lane. Output and the status show it by its number.
Start it
Section titled “Start it”Commands in the folder keep acting on its first lane, so name the second one. Add --profile with one of your profiles, the named sets of services and settings in the project file, to run other services than the first lane.
$ devlanes start --lane review --no-uiThe lane runs its setup and create tasks like any new lane, and a unit reference such as review:web reaches one of its services.
Keep the lanes’ files apart
Section titled “Keep the lanes’ files apart”Each lane has its own ports, hostnames and data folder, but the files in the worktree are shared, build output and caches included. Point a service that writes while it runs at the lane’s data folder.
services: api: env: UPLOAD_DIR: "${{ lane.data_path }}/uploads"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>.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.
Remove it
Section titled “Remove it”Cleaning the lane deletes its data and frees its number. A lane added with devlanes lane new does not come back afterwards.
$ devlanes lane clean review --yesIf you need another branch
Section titled “If you need another branch”The lanes of one folder run the branch it has checked out. For another branch, add a worktree with Git and start there, as Every worktree gets a lane shows.