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:
| Path | Schema | Use it for |
|---|---|---|
autodisc deploy CLI | Version 1 nested manifest | One service deployed from a local checkout or repository |
| Source-connected project | Flat service map | Multiple 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: productionThe 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: productionThis 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.
| Field | Type | Description |
|---|---|---|
run | string | Start command. Runs after build. Alias: command. |
build | string or string[] | Commands that run before run. A list runs in order. |
runtime | string | Runtime hint (node, python, dockerfile, etc.). Used when no image or Dockerfile is specified. |
image | string | Explicit container image, e.g. node:20-slim. Overrides runtime detection. |
dockerfile | relative path | Path to a Dockerfile, relative to the repo root. Picking this takes precedence over image/runtime. |
workdir | relative path | Working directory inside the container. Must be relative and cannot escape the project root. |
env | map of string→string | Non-secret environment defaults. Do not put secrets here — use dashboard env vars. |
port | integer | Port your app listens on. Autodisc exposes this port publicly for your server. |
internal | boolean | If true, the service is reachable only from sibling services, not from the internet. |
routes | list | Route bindings (host and optional path). See Routes. |
services | map | Multi-service config. See Multi-service. |
resources | map | Managed data resources keyed by repository-chosen stable names. |
bindings | list | Named 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: 3000Rules worth knowing:
buildcommands andrunare joined with&&when executed, so a failed build command stops the deploy.- Relative paths (
dockerfile,workdir) cannot start with/or contain... envvalues 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: /v1hostis required;pathdefaults to/.pathmust 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:
- webField notes:
- Service names must be non-empty strings.
- If a service named
webexists, it's treated as the primary service for routing defaults. depends_onis a list of other service names that should start first.internal: truekeeps the service off the public network.- When
servicesis omitted, Autodisc creates a single implicit service calledappfrom the top-level fields.
Runtime detection
When no autodisc.yml is present, Autodisc inspects your repo:
| File | Runtime | Default start |
|---|---|---|
Dockerfile | Docker | (from Dockerfile) |
package.json | Node | npm start |
requirements.txt / pyproject.toml | Python | python 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_URLSupported managed types are postgresql, mysql, mariadb, mongo, redis,
and libsql. See Set up your repository.