Migrate from another process manager
Use this guide when mprocs, a Procfile, process-compose, pm2, tmuxinator, concurrently or Docker Compose runs your dev processes today. A coding agent with the devlanes skill does the migration; paste this into it from the repository.
Install the devlanes skill:npx skills add devlanes-run/devlanes --skill devlanes
Then install devlanes on this machine, set up everything it needs,and help me port this project to devlanes from whatever runs it today.::example{slug="workflows-mprocs-migration"}
Check what the agent wrote
Section titled “Check what the agent wrote”The agent keeps the old files, so people who do not use devlanes keep their setup. Its project file follows these rules:
- A process that keeps running becomes a service with a ready check.
- A command that ends by itself, such as an install or a migration, becomes a task.
- A container stays in its Compose file, which the project file runs under
infra. - A fixed port becomes the port devlanes gives the service in each lane.
web: bin/rails server -p $PORTservices: web: run: bin/rails server -p $PORT -b 127.0.0.1 hosts: "${{ lane.domain }}" ready: http: path: /upservicesLong-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>.runCommand that starts the service. A string runs with /bin/sh -c, so pipes, && and multi-line scripts work; a list is an argv run directly without a shell. It starts in the project file's directory unless cwd is set. devlanes runs it exactly as written, so it cannot be combined with preset; prefer run_script when the command is a script in a project file. Exactly one of run and run_script is required after templates are applied. In a list, an item that is one ${{ }} expression giving a number or true/false becomes its text, such as --port followed by ${{ self.port }}.
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.
services.<name>.readyWhen the service counts as up: once its check passed and it has run half a second. devlanes start waits for it, and after: services tasks run once every started service is ready. Write started (no probe) or a mapping with one of tcp, http, log or cmd, plus timeout (default 60s). Without it, a service with hosts waits for TCP on its port and one without hosts uses started. A service that exits within that half second failed to start. A check that times out marks the service failed, which also skips after: services tasks; the process keeps running and is not restarted.
services.<name>.ready.httpReady once a GET request to path on the unit's main port answers with status, or with a 2xx status when status is unset. Redirects are not followed. Best when the app has a health route that fails while it is broken. Each request sends User-Agent: devlanes-ready, so an app can leave the checks out of its request logs.
services.<name>.ready.http.pathPath requested with GET, such as /healthz; defaults to /.
Stop the old reverse proxy
Section titled “Stop the old reverse proxy”If Caddy, nginx or Traefik served the project until now, the devlanes proxy takes its place, and the old one has to let go of ports 443 and 80. While its container runs, lane URLs carry port 8443, and an app that builds its URLs without a port gets them wrong. Remove the container, then restart the daemon so its proxy takes the ports:
$ docker compose rm -sf caddy$ devlanes daemon restartChoose the proxy’s ports shows how to check which ports the proxy has.
Settings that do not carry over
Section titled “Settings that do not carry over”The agent lists the ones your setup had:
- Restart policies, because a failed service stays failed with its error (The daemon).
- Dependencies between services, because services do not wait for each other (Start order and readiness).
- Loading
.envinto every process (Read .env values and pin tool versions). - Log files and terminal layouts, because devlanes keeps each service’s output.
If you would rather write the file yourself
Section titled “If you would rather write the file yourself”Add devlanes to a project goes through it step by step.