Deplexo configuration

Add a deplexo.yaml file to your application's root directory to configure how Deplexo builds and runs your app. Use version 1. Other fields are optional and fall back to your dashboard settings. One file configures one app.

Quick start

Create deplexo.yaml in your application's root directory:

version: 1
type: web

build:
  framework: auto
  install: npm ci
  command: npm run build

run:
  command: npm start
  port: 3000

Commit and push. On the next deploy, Deplexo reads this file and uses your settings. Explicit values in deplexo.yaml override dashboard settings. For a monorepo, set build.root_dir. Keep the YAML file at the source root.

Configuration priority

For framework selection and the install, build, and start commands, the source with the highest priority wins:

Dashboard>deplexo.yaml>Auto-detect

All fields

FieldTypeDescription
versionnumberRequired. Use version 1.
typestringweb or worker. Existing apps keep their original type.
build.root_dirstringBuild directory relative to the repository or extracted ZIP root.
build.frameworkstringBuild method: auto detects the framework; dockerfile uses your build file. Omitted fields use dashboard settings.
run.portnumberWeb app port, from 1 to 65535. Sets the visible PORT environment variable and routing port. Omit for background workers.
build.installstringCustom install command that replaces the auto-detected install step (e.g. npm ci, pip install).
build.commandstringCustom build command that runs after install (e.g. npm run build, go build).
run.commandstringCustom start command, used as the container CMD (e.g. node server.js, gunicorn app:app).
build.dockerfilestringPath to a custom Dockerfile. When set, Deplexo skips framework detection and builds from this file.

Framework examples

Select a framework to see an example deplexo.yaml build configuration.

Detects npm, yarn, pnpm, or bun from lock files. Also detects Next.js, Vite, and Express and picks defaults to suit each.

version: 1
type: web

build:
  framework: auto
  install: npm ci
  command: npm run build

run:
  command: npm start
  port: 3000

Build caching

Deplexo can reuse dependencies and unchanged build layers to speed up repeat deployments. Whether the cache is used, and how long builds take, depends on your framework, your configuration, and what changed.

Keep dependency files separate from frequently changing source files to make better use of caching.

Tips

  • Set run.port in YAML or PORT in the dashboard. Web apps default to port 3000. YAML port values stay visible in the environment list.
  • Environment variables set in the dashboard are injected at runtime and are not available during the build. Keep passwords, tokens, and other secrets out of committed build commands.
  • If auto-detection cannot build your project, use a Dockerfile and set build.framework to dockerfile.
  • For full control, set build.framework to dockerfile or add a Dockerfile to your repo and select "Dockerfile" as the build method.
  • Never put secrets in deplexo.yaml, because it's committed to your repo. Put API keys, database URLs, and similar values in the dashboard's environment variables, which are encrypted at rest.

Cookie choices

We use essential cookies to keep the site working. Cookieless page counts run automatically. Performance measurements are optional and only run with your consent.

Cookie policy