ScalixScalix Docs
Sign up

Deploy from Source — Node, Python, Django, Go and Rust

Deploy a Node, Python, Django, Go or Rust app to Scalix Run straight from a Git repository. No Dockerfile needed: the build service detects your runtime and attaches a managed Postgres database.

Services can also be deployed and managed from the console, the REST API (/v1/run/services), or the SDKs. CLI install: getting started.

Deploying a Service

bash
scalix-cloud run deploy --name api \
  --image api.scalix.world/<project-id>/api:v2 \
  --port 8080 \
  --min-instances 2

Deploy from source

Deployments build from a Git repository, not a local directory. Push your code, let the build service produce an image, then deploy it:

bash
scalix-cloud run deploy --name my-app --image api.scalix.world/<project-id>/my-app:v1

The build service reads your repository and picks a runtime from the first marker file it finds, in this order. You do not write a Dockerfile unless you want to.

Marker file in your repoRuntimeInstall step
package.jsonNodenpm ci
requirements.txt, pyproject.toml or setup.pyPythonpip install gunicorn -r requirements.txt
go.modGo (version read from the go directive)Go module build
Cargo.tomlRust (binary name read from [package])Cargo release build
index.html with no toolchainStatic sitenone, served by nginx
DockerfileWhatever you defineyour build

Deploy a Node app

Any repository with a package.json is detected as Node. Dependencies install with npm ci, your build script runs if you have one, and your start script becomes the entrypoint. Express, Next.js, NestJS and plain HTTP servers all work without configuration.

Read the port from the environment rather than hardcoding it. The platform injects PORT when the service boots:

js
const port = Number(process.env.PORT ?? 8080);
app.listen(port, "0.0.0.0");

Bind 0.0.0.0, not 127.0.0.1. A server bound to localhost inside a container answers only itself.

Deploy a Python app

A requirements.txt, pyproject.toml or setup.py selects Python, and gunicorn is installed alongside your dependencies. The start command is chosen from what is in your repository:

File presentStart command
manage.pypython manage.py runserver 0.0.0.0:$PORT
wsgi.pygunicorn wsgi:app --bind 0.0.0.0:$PORT
application.pygunicorn application:app --bind 0.0.0.0:$PORT
server.pygunicorn server:app --bind 0.0.0.0:$PORT
app.py or main.pypython app.py / python main.py

Django is detected by manage.py, so a standard Django project deploys with no configuration. Flask and FastAPI projects are picked up through app.py, main.py or a wsgi.py entrypoint. For production Django you will usually want gunicorn rather than the development server, which you get by adding a wsgi.py or by setting an explicit start command on the service.

Deploy a Go app

A go.mod selects Go, and the Go version is read from the go directive in that file, so the build matches what you develop against.

Deploy a Rust app

A Cargo.toml selects Rust. The binary name comes from the [package] section and the build runs in release mode.

Anything else

Ruby, PHP, Java, .NET and Elixir have no marker-file detection. They deploy perfectly well on Scalix Run, but you supply a Dockerfile and the build service uses it as-is. If you would rather not containerise, a Scalix Computer gives you a persistent Linux machine with ssh where you install whatever you like.

Attaching a database

A service and its database live under the same API key. Create the database, then pass its connection string in as an environment variable at deploy time rather than committing it:

bash
scalix-cloud run deploy --name my-app \
  --image api.scalix.world/<project-id>/my-app:v1 \
  --port 8080 \
  --env DATABASE_URL=$DATABASE_URL

See ScalixNova for creating the database, and branching for throwaway copies per environment.

Where source detection does not apply

Runtime coverage differs by product, and it is worth knowing before you plan an architecture:

  • Scalix Run builds from source in Node, Python, Go and Rust, and from a Dockerfile in any language.
  • Functions run Node and Python only. Go and Rust are not available as functions.
  • Sandboxes provide Node and Python environments.
  • Computers are full Linux machines, so any language you can install.

Revision History

Every deployment creates a new revision:

bash
scalix-cloud run get <service-id>
plaintext
REVISION    IMAGE                    STATUS    CREATED
rev-4       my-org/api:v4           active    2m ago
rev-3       my-org/api:v3           retired   1d ago
rev-2       my-org/api:v2           retired   3d ago

Health Checks

Configure health checks for your service:

json
{
  "health_check": {
    "path": "/health",
    "port": 8080,
    "interval_seconds": 10,
    "timeout_seconds": 5,
    "healthy_threshold": 2,
    "unhealthy_threshold": 3
  }
}

New revisions only receive traffic after passing health checks.

Environment Variables

bash
scalix-cloud run deploy --name api \
  --image my-image:v1 \
  --port 8080 \
  -e DATABASE_URL=postgres://... \
  -e REDIS_URL=redis://...