autodisc

Configuration

The supported autodisc.yml schemas, runtime detection, and current CLI boundary.

Autodisc reads an optional autodisc.yml from the repository root. If it is missing, Autodisc falls back to runtime detection. Use an explicit file when you need a reviewable build, start command, port, or multi-service topology.

Choose the correct schema

There are currently two compatible entry paths:

PathSchemaUse it for
autodisc deploy CLIVersion 1 nested manifestOne service deployed from a local checkout or repository
Source-connected projectFlat service mapMultiple services detected or reviewed as an Application Plan

The current CLI is single-service. It does not atomically apply the multi-service form described later on this page.

CLI version 1

version: "1"
name: my-api

source:
  type: repo
  repo_full_name: acme/my-api
  repo_branch: main

runtime:
  stack: dockerfile
  dockerfile: Dockerfile
  start_command: node dist/server.js
  port: 3000

deployment:
  plan_type: starter
  public: true
  auto_restart: true

environment:
  NODE_ENV: production

The CLI requires version, name, source.type, deployment.plan_type, and a start command for repository sources.

Source-connected minimal service

run: npm start
env:
  NODE_ENV: production

This flat form is parsed by the source-connected hosting and repository preparation paths. It creates one implicit service named app.

Flat schema fields

All fields in the flat schema 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.
resourcesmapManaged data resources keyed by repository-chosen stable names.
bindingslistNamed resource outputs mapped to service environment variables.

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 requires a verified domain and the expected DNS records. See Troubleshooting if a custom host does not resolve.

Multi-service

For projects with more than one process, use services in a source-connected project. Each service is a full config and inherits top-level defaults.

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.

Source-connected projects may commit managed resource intent and output bindings. The file never contains the generated credential:

resources:
  data:
    type: mysql
    class: shared-small

bindings:
  - source: resource.data.connection_url
    target: service.app.environment.MYSQL_URL

Supported managed types are postgresql, mysql, mariadb, mongo, redis, and libsql. See Set up your repository.

On this page