cubby deploy
Deploy your app to the Cubby platform. This command packages your source code, uploads it, builds a Docker image, and starts your container.Usage
Arguments
| Argument | Description | Default |
|---|---|---|
directory | Path to the app directory | . (current directory) |
Flags
| Flag | Short | Description | Default |
|---|---|---|---|
--name | -n | App name (overrides directory name) | Directory name |
--yes | -y | Skip confirmation prompts (auto-confirm redeploy) | false |
--verbose | -v | Show detailed build logs | false |
--port | -p | Port the app listens on | 3000 |
Examples
What Happens During Deploy
- Authentication check - Verifies you’re logged in
- Dev container detection - Prompts to stop local dev containers if running
- Framework detection - Auto-detects Next.js, Vite, Remix, or Node.js
- Dockerfile generation - Creates optimized Dockerfile if not present
- Packaging - Creates tarball of source code (respects
.gitignore) - Upload - Sends tarball to Cubby servers
- Build - Docker image built on remote server
- Database provisioning - Creates Postgres database if Prisma detected
- Migration - Runs
prisma db pushautomatically - Container start - Launches your app with injected secrets
- Health check - Verifies app responds on configured port
App Name Rules
App names are used in URLs (<app>.<username>.cubby.pro) and must follow DNS rules:
- 3-30 characters
- Lowercase letters, numbers, and hyphens only
- Must start and end with a letter or number
- No consecutive hyphens
Redeploying
When deploying an app that already exists:--yes to skip this confirmation:
Deploy Output
A successful deploy shows:Troubleshooting
”Could not detect framework”
Cubby auto-detects common frameworks. If detection fails:- Ensure
package.jsonexists with correct dependencies - Or provide your own
Dockerfilein the project root
”Build failed”
Runcubby check first to validate your project locally:
”Not logged in”
Authenticate first:Verbose Build Logs
If deployment fails, use--verbose to see detailed build output:
Related Commands
cubby check- Validate before deployingcubby init- Create a new appcubby secrets- Manage environment variablescubby delete- Remove a deployed app