Deploying to DBOS Cloud
Any application built with DBOS can be deployed to DBOS Cloud. DBOS Cloud is a serverless platform for durably executed applications. It provides:
- Application hosting and autoscaling: Managed hosting of your application in the cloud, automatically scaling to millions of users. Applications are charged only for the CPU time they actually consume.
- Managed workflow recovery: If a cloud executor is interrupted, crashed, or restarted, each of its workflows is automatically recovered by another executor.
- Workflow and queue management: Dashboards of all active and past workflows and all queued tasks, including their status, inputs, outputs, and steps. Cancel, resume, or restart any workflow execution and manage the tasks in your distributed queues.
Deploying Your App to DBOS Cloud
- Python
- TypeScript
1. Install the DBOS Cloud CLI
The Cloud CLI requires Node.js 20 or later.
Instructions to install Node.js
- macOS or Linux
- Windows
Run the following commands in your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 22
nvm use 22
Download Node.js 20 or later from the official Node.js download page and install it.
After installing Node.js, create the following folder: C:\Users\%user%\AppData\Roaming\npm
(%user%
is the Windows user on which you are logged in).
Run this command to install it.
npm i -g @dbos-inc/dbos-cloud@latest
2. Create a requirements.txt File
Create a requirements.txt
file listing your application's dependencies.
pip freeze > requirements.txt
3. Define a Start Command
Set the start
command in the runtimeConfig
section of your dbos-config.yaml
to your application's launch command.
If your application includes an HTTP server, configure it to listen on port 8000.
To test that it works, try launching your application with dbos start
.
runtimeConfig:
start:
- "fastapi run"
4. Deploy to DBOS Cloud
Run this single command to deploy your application to DBOS Cloud!
dbos-cloud app deploy
1. Install the DBOS Cloud CLI
Run this command to install the Cloud CLI globally.
npm i -g @dbos-inc/dbos-cloud@latest
2. Define a Start Command
Set the start
command in the runtimeConfig
section of your dbos-config.yaml
to your application's launch command.
If your application includes an HTTP server, configure it to listen on port 3000.
To test that it works, try launching your application with npxdbos start
.
runtimeConfig:
start:
- "npm start"
3. Deploy to DBOS Cloud
Run this single command to deploy your application to DBOS Cloud!
dbos-cloud app deploy