Skip to content

devlanes is in beta and not ready for production use.Report an issue

Point a frontend at another lane's backend

Use this when a branch changes only the frontend and you want it to call the API of the main lane instead of starting a second backend.

::example{slug="workflows-profiles-tags"}

A profile is a named set of services and settings a start can pick. This one starts only the web service and gives it lane 0’s API through lanes.main.

devlanes.yaml
profiles:
attach:
include: [web]
infra: false
env:
VITE_API_URL: "${{ lanes.main.services.api.public_url }}"

The profile’s variable replaces the web service’s own. The infra: false line skips the lane’s containers and setup; its start tasks, such as a migration, still run.

~/dev/myapp-checkout
$ devlanes start 0:api --no-ui

Stop the feature lane first if it runs, since a start does not change services that already run. Then start the profile.

~/dev/myapp-checkout
$ devlanes stop
$ devlanes start --profile attach --no-ui

The web service of lane 1 starts and calls the API of lane 0.

Each lane domain is a site of its own, so an API that allows only its own lane’s origins refuses the page of lane 1. Set CORS and cookies for each lane covers allowing it.

Read it from the projects namespace, with a fallback for when that project runs nothing.

devlanes.yaml
profiles:
attach:
include: [web]
env:
VITE_API_URL: "${{ projects.billing.services.api.public_url | default('https://billing.example.invalid') }}"