Deploy a GitHub repo as a server
lavela.provision_compute_from_repoBuild a GitHub repo on lavela and run it as a server with a public URL — any runtime, no Dockerfile needed. Async: poll lavela.compute_build_status {buildId} until "ok" (URL) or "failed" (next_step has the fix). REDEPLOYING a service it already built? Use lavela.compute_rebuild — calling this again replaces the server with exactly what you give (defaults: repo root, default branch, 8080, no env). Database/cache port (5432, 6379…): private, always on, no URL — alwaysOn:true after the user OKs the price. Paid from the lavela wallet (balance: lavela.account_status; prices: https://console.lavela.dev/pricing) — confirm with the user before calling. Details: https://console.lavela.dev/docs/mcp#deploy-from-repo
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Non-secret env, e.g. {"SERVICE":"api"} (one repo, several services). Credentials: set_compute_secret. | |
| size | No | Omit: a new server is 512mb, a redeploy keeps its size. Above 512mb only after a paid top-up; costs more (up to US$92 a month). | |
| gitRef | No | Branch, tag or commit (default: the default branch). | |
| mounts | No | Volumes to attach, e.g. [{volume:"vol_…", path:"/data"}] (provision_volume); a redeploy without them keeps them. | |
| subdir | No | Folder to build, for a monorepo. | |
| service | No | Service name (web/api/worker; default "web") — one call per service. | |
| alwaysOn | No | Keep the server awake (no wake-up delay), at its size's always-on price (512 MB: US$7 a month vs US$2–7 sleeping; up to US$92 at 8 GB) — confirm with the user. Omit: a new server sleeps when idle; a redeploy keeps the service's current setting. Switch later with lavela.compute_always_on. | |
| githubUrl | Yes | The repo, e.g. https://github.com/owner/repo (private once GitHub is connected). | |
| projectId | Yes | ||
| internalPort | No | Port the app listens on (default 8080; PORT is set to it). Only for a fixed non-8080 port — env PORT alone doesn't reroute (502s). |