What this does
levelrail-cli deploy packs a directory on your machine, uploads it to the control plane, builds it there and follows the deploy until the app is healthy. You need no git remote, no registry and no SSH access. It is the quickest way to try an app that is not in a repository yet.
The directory needs a Dockerfile or a stack Levelrail detects (Node, Go, Python, Java and others, built with Railpack). Docker Compose projects are not supported by this command yet. For a static site, see Drop deploy: levelrail-cli deploy ./site --static or a .zip.
Deploy a directory
Sign in once (levelrail-cli login --device, or set APP_API_URL and APP_API_TOKEN), then run this in the project folder:
EXPOSE line or the detected framework. Running it again uploads the new contents and deploys them to the same app. Pass a path to deploy another folder, --app NAME to pick the app name, and --port N to override the port.
Before anything is sent you see what will be uploaded:
--timeout (default 15 minutes) ends before the deploy finishes. The deploy itself keeps running after a timeout.
What is uploaded
Everything in the directory except:- files matched by
.gitignore(the root one and nested ones), .git,node_modules,.next,.nuxt,.turbo,.venv,venv,__pycache__,target,coverage,.terraformand.DS_Store,- secret-looking files:
.env,.env.*(except.env.example,.env.sampleand.env.template),*.pem,*.key,id_rsa*andid_ed25519*.
.gitignore rule that starts with ! cannot bring a secret file back. Symbolic links and special files are never uploaded. To send an ignored path on purpose, name it with --include, for example --include .env.
--dry-run lists the files that would be uploaded and changes nothing:
Environment and build arguments
--env sets runtime variables on the app and is repeatable. --build-env passes Dockerfile ARG values to the build and is repeatable. For secrets use levelrail-cli apps secrets set, not --env, because env values are visible in the app’s env list.
Size limits and retention
When the directory is over the cap the CLI stops before uploading and says which variable to raise. Excluding build output in
.gitignore is usually the better fix.
The control plane keeps each uploaded archive under its data directory for the retention period, then deletes it. Uploading identical content again reuses the stored archive. Deploy history shows each upload as “Uploaded” with the archive hash and file count, and no git commit.
Roll back or redeploy an earlier upload
Every build is tagged with its archive hash, so the normal rollback works:Security
- The upload endpoint needs the
deployability on the token or session, and every upload is written to the audit log. Archive contents are never logged. - Archives are checked before they are stored and again when extracted: absolute paths,
..segments, symbolic links, hard links, devices and other special files are rejected, and file count and expanded size are capped so a small archive cannot expand into a disk-filling bomb. - Stored archives live in the control plane data directory, never in a web-served path.
Related
- Deploying apps covers git sources, images, rollbacks and promotion.
- Getting started installs the control plane and the CLI.