deploy
Deploy your application to sota.io with automatic framework detection, Docker image building, and zero-downtime blue-green deployments. Includes a managed PostgreSQL database.
Instructions
Deploy an application to sota.io. Creates a tar.gz archive of the specified directory and uploads it (max 50 MB). The platform auto-detects your framework and builds a Docker image automatically:
Next.js: Detected via next.config.js/ts. Add output: 'standalone' to next.config for optimal builds.
Node.js: Detected via package.json with a "start" script. Works with Express, Fastify, Koa, Hapi, etc.
Python: Detected via requirements.txt or pyproject.toml. Works with Flask, FastAPI, Django.
Custom Dockerfile: If a Dockerfile exists in the project root, it takes priority over auto-detection. Use this for Go, Rust, Java, or any other language. The EXPOSE directive in the Dockerfile is used to detect the app port automatically.
IMPORTANT: Your app MUST listen on the PORT environment variable. For auto-detected frameworks (Next.js, Node.js, Python) PORT is 8080. For custom Dockerfiles, the port is auto-detected from the EXPOSE directive (e.g. EXPOSE 3000 sets PORT=3000). If no EXPOSE is found, it defaults to 8080.
Every project includes a managed PostgreSQL 17 database. Six environment variables are auto-injected into your container — no manual database configuration needed: DATABASE_URL (full connection string), PGHOST, PGPORT, PGUSER, PGPASSWORD, and PGDATABASE. Libraries that follow libpq conventions (node-postgres, pgx, psycopg2, Django) pick up the PG* variables automatically with no configuration. If your app needs database migrations, run them on startup.
Deployments use blue-green strategy for zero downtime. The old container keeps running until the new one passes health checks (60s timeout). Use get-logs to monitor build progress. Files matching .gitignore and .sotaignore are excluded from the archive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | No | Absolute path to the directory to deploy. Defaults to current working directory. Must contain your app source code (package.json, requirements.txt, or Dockerfile) | |
| project_id | Yes | Project ID (UUID) to deploy to. Use list-projects to find the ID |