sota.io

sota deploy

Deploy the current project to sota.io. Packages your code, uploads it, builds a Docker image, and returns a live URL.

Usage

sota deploy

How It Works

  1. Package -- Creates a .tar.gz archive of your project directory (respects .sotaignore and .gitignore)
  2. Upload -- Sends the archive to POST /v1/projects/{id}/deploy as multipart form data
  3. Build -- Framework auto-detection (Next.js, Node.js, Python) or Dockerfile fallback
  4. Deploy -- Container started with health checks, blue-green swap for zero downtime
  5. URL -- Live at https://{slug}.sota.io

Output

$ sota deploy

Packaging my-app...
Uploading archive (2.3 MB)...
Building... detected Next.js
Image built successfully
Deploying to my-app.sota.io...

Live at https://my-app.sota.io

Build logs are streamed in real-time via SSE.

Ignore Files

The CLI respects these files when creating the archive:

  • .sotaignore -- sota-specific ignore rules (takes priority)
  • .gitignore -- Git ignore rules (used as fallback)

Common patterns to ignore:

node_modules/
.next/
.git/
.env*

First Deploy

On first deploy in a directory, the CLI asks for a project name and creates a new project on sota.io. The project slug is auto-generated from the name (lowercase, hyphens) and becomes the subdomain. For example, "My App" becomes my-app.sota.io.

A .sota.json file is created linking the directory to the project.

Subsequent Deploys

Each deploy creates a new deployment with a zero-downtime blue-green swap. The previous deployment remains available for rollback.

Environment Variables

The container always receives PORT=8080. Additional variables can be set via sota env.