autodisc

Configuration

The autodisc.yml reference and runtime detection.

Autodisc reads an optional autodisc.yml from the root of your project. If it's missing, Autodisc falls back to runtime detection (Dockerfile → package.jsonrequirements.txt / pyproject.toml). Use autodisc.yml when auto-detection picks the wrong runtime, command, or port.

Minimal example

run: npm start
env:
  NODE_ENV: production

That's enough for most Node and Python projects.

Top-level fields

All fields are optional.

FieldTypeDescription
runstringStart command. Runs after build. Alias: command.
buildstring or string[]Commands that run before run. A list runs in order.
runtimestringRuntime hint (node, python, dockerfile, etc.). Used when no image or Dockerfile is specified.
imagestringExplicit container image, e.g. node:20-slim. Overrides runtime detection.
dockerfilerelative pathPath to a Dockerfile, relative to the repo root. Picking this takes precedence over image/runtime.
workdirrelative pathWorking directory inside the container. Must be relative and cannot escape the project root.
envmap of string→stringNon-secret environment defaults. Do not put secrets here — use dashboard env vars.
portintegerPort your app listens on. Autodisc exposes this port publicly for your server.
internalbooleanIf true, the service is reachable only from sibling services, not from the internet.
routeslistRoute bindings (host and optional path). See Routes.
servicesmapMulti-service config. See Multi-service.

A fuller example

runtime: node
image: node:20-slim
workdir: app
build:
  - npm ci
  - npm run build
run: node dist/server.js
env:
  NODE_ENV: production
  PORT: "3000"
port: 3000

Rules worth knowing:

  • build commands and run are joined with && when executed, so a failed build command stops the deploy.
  • Relative paths (dockerfile, workdir) cannot start with / or contain ...
  • env values are coerced to strings — quote numbers ("3000") to avoid YAML surprises.
  • If neither run, build, nor an image is set, Autodisc falls back to runtime detection for that field.

Routes

Routes map external hostnames to a service. The shorthand form is a host string; the full form lets you restrict by path.

routes:
  - example.com
  - host: api.example.com
    path: /v1
  • host is required; path defaults to /.
  • path must start with /.
  • Paths are matched as prefixes.

Domain routing is still being polished — see Troubleshooting if a custom host doesn't resolve.

Multi-service

For projects with more than one process (web + worker, API + scheduler, etc.), use services. Each service is a full config and inherits nothing from the top level except env (service env is merged over the top-level env).

env:
  NODE_ENV: production

services:
  web:
    run: node dist/server.js
    port: 3000
    routes:
      - example.com

  worker:
    run: node dist/worker.js
    internal: true
    depends_on:
      - web

Field notes:

  • Service names must be non-empty strings.
  • If a service named web exists, it's treated as the primary service for routing defaults.
  • depends_on is a list of other service names that should start first.
  • internal: true keeps the service off the public network.
  • When services is omitted, Autodisc creates a single implicit service called app from the top-level fields.

Runtime detection

When no autodisc.yml is present, Autodisc inspects your repo:

FileRuntimeDefault start
DockerfileDocker(from Dockerfile)
package.jsonNodenpm start
requirements.txt / pyproject.tomlPythonpython main.py

If detection is wrong — or if you want an explicit, reviewable setup — add autodisc.yml.

Secrets

Secrets belong in the dashboard's environment variables panel, not in autodisc.yml. The config file is committed to your repo; anything written in env: becomes part of your source history.

On this page