Deploying apps
A deployment is your app, built from a Git branch and kept running in its own sandbox. Its port opens at an HTTPS address. When nothing has used it for five minutes the sandbox sleeps, and the next request wakes it. While it’s asleep you pay only for its disk.
Deploy from a folder
Section titled “Deploy from a folder”In a Git checkout whose branch is pushed:
stillbox deployStillbox reads the checkout’s origin remote and current branch, works out how to build and start the app, and waits
until it answers. It prints the address when it does. Only pushed commits are deployed: Stillbox warns you about
uncommitted changes and unpushed commits.
| Your project has | Build | Start | Port |
|---|---|---|---|
A Procfile with a web: line |
the install for its language | the web: command |
8080 |
package.json with a start script |
npm ci && npm run build (pnpm and Yarn too) |
npm run start |
3000 |
A Mastra app (@mastra/core) |
npx mastra build |
node .mastra/output/index.mjs |
4111 |
FastAPI (app = FastAPI() in main.py, app.py …) |
a virtual environment and pip install |
uvicorn main:app |
8000 |
| Flask | the same | gunicorn, or flask run |
8000 |
Django (manage.py) |
the same | manage.py runserver |
8000 |
Your app must listen on the port in $PORT, on all addresses (0.0.0.0). Flags change anything Stillbox worked
out:
stillbox deploy --build "make" --start "./bin/server" --port 9000 --health /healthzstillbox deploy web/ # a folder inside the repository: it builds and runs therestillbox deploy --name shop-staging --branch stagingstillbox deploy --private # only your API key opens the addressstillbox deploy -e LOG_LEVEL=debug # an environment variableYour app’s code comes from public repositories, or from the code hosts your organization allows for repository
links (GitHub and GitLab unless it changed them). For private repositories, and for secrets, use an
environment: stillbox deploy --environment <id> gives the app the environment’s
repositories, variables and secrets. As in every sandbox, real keys stay outside: the app sees placeholders that
Stillbox swaps on the way out.
Start from a template
Section titled “Start from a template”stillbox init writes a small web app for an agent framework, ready to deploy:
stillbox init langgraph # or crewai, openai-agents, adkcd langgraph-agentgit init && git add . && git commit -m "LangGraph agent" # then push it to GitHub or GitLabstillbox deploy --health /healthEach template serves its agent over HTTP with a /health check, pins its requirements, and calls models through the
sandbox’s model settings: Stillbox’s model or your organization key, so no key goes in the code. The
LangGraph template keeps each thread’s conversation, in your own Postgres when you set DATABASE_URL.
Redeploy
Section titled “Redeploy”Run stillbox deploy again, or:
stillbox deployments redeploy shop # pull the branch's latest commits, build, restartstillbox deployments redeploy shop --no-pullThe new version builds while the current one keeps serving. If the build fails, the current version stays and
stillbox deployments status says why. A sandbox that was asleep or away during a redeploy runs the new version when
it next starts: what the platform has recorded is what runs.
Status and logs
Section titled “Status and logs”stillbox deployments lsstillbox deployments status shop # building, starting, running, crashed or failed; restarts; the commitstillbox deployments logs shop -n 100stillbox deployments rm shop # deletes the app and its sandboxIf your app stops by itself it starts again after a pause that grows from one second to thirty. The logs keep the build’s and the app’s output, up to 8 MB; the oldest is dropped first.
Through the API
Section titled “Through the API”POST /v1/deployments with name, repository (or environment), start and port, and optionally branch,
dir, build, health_path, visibility, env, vcpus, memory_mb and auto_sleep_seconds. The
API reference lists every field. API keys with the create level may deploy and delete; use may
redeploy.
Not yet
Section titled “Not yet”- Building from a Dockerfile. Until then, give a build and start command.
- Your own domain for an app.