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: 3000Commit 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:
All fields
| Field | Type | Description |
|---|---|---|
version | number | Required. Use version 1. |
type | string | web or worker. Existing apps keep their original type. |
build.root_dir | string | Build directory relative to the repository or extracted ZIP root. |
build.framework | string | Build method: auto detects the framework; dockerfile uses your build file. Omitted fields use dashboard settings. |
run.port | number | Web app port, from 1 to 65535. Sets the visible PORT environment variable and routing port. Omit for background workers. |
build.install | string | Custom install command that replaces the auto-detected install step (e.g. npm ci, pip install). |
build.command | string | Custom build command that runs after install (e.g. npm run build, go build). |
run.command | string | Custom start command, used as the container CMD (e.g. node server.js, gunicorn app:app). |
build.dockerfile | string | Path 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: 3000Build 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.portin YAML orPORTin 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.frameworktodockerfile. - For full control, set
build.frameworktodockerfileor add aDockerfileto 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.