The configuration file
Every field of the [run] table in sypnia.toml.
Every Sypnia product reads one file: sypnia.toml, at the root of your repository. Run reads its [run] table and ignores the tables of the other products. Each app is a table of its own, [run.apps.<name>]. Everything is optional; Run fills in what is missing from your project and prints what it decided in the build log.
format = 1
project = "la-espiga"
[run.apps.laespiga]
kind = "ssr"
framework = "nextjs"The first npx @sypnia/run deploy writes the app’s table for you. The Run command line only ever rewrites the [run] table, and keeps your comments. Never put secrets in this file: they go in environment variables and secrets.
The project
| Key | Type | What it is |
|---|---|---|
format | 1 | the format of the file |
project | string | the Sypnia project the apps belong to; asked on the first deploy if missing, and shared by every product |
An app: [run.apps.<name>]
The table’s name is the app’s name: lowercase letters, digits and dashes, unique in the project.
| Key | Type | Default | What it does |
|---|---|---|---|
root | string | . | The app’s folder in a monorepo |
kind | static · ssr · container · function | detected | The app’s kind |
framework | string | detected | nextjs, astro, sveltekit, nuxt, react-router, vite… |
build.command | string | detected | The build command |
build.output | string | detected | The output folder for static sites |
build.node | string | 22 | Node major version |
build.env | list | [] | Variables available at build time |
runtime | lambda · fargate | lambda | For containers: fargate asks for an always-on container (A container on Fargate) |
memory, timeout, min_instances, max_instances | numbers | per kind | The server part’s size and scaling |
cpu | number | 0.5 | vCPU for Fargate |
health_check.path, health_check.timeout | string, seconds | /, 5 | The health check |
spa | boolean | false | Fall back to index.html |
headers, redirects, rewrites | lists | [] | Applied at the edge |
functions | tables | none | Functions next to the app |
jobs | tables | none | Scheduled jobs |
queues | tables | none | Queues |
previews.protection | string | sypnia | Preview access |
release.auto_rollback | table | off | Automatic rollback |
telemetry | boolean or table | false | Send logs and traces to Sypnia Telemetry |
use_cases | string | none | The folder of the use-case map ("cases"), or "sypnorm" to build it from the code (Use cases) |
cases.split | tables | none | Cases that get a service of their own, with memory, timeout, runtime, concurrency (How use cases run) |
cases.handlers | table | none | For cases written in another language: the function or container route that runs each one (Code in another language) |
A key in [run] that the engine does not know is an error, so a typo never passes silently.
Several apps
A monorepo lists each app with its folder:
format = 1
project = "la-espiga"
[run.apps.web]
root = "apps/web"
kind = "ssr"
[run.apps.kitchen-api]
root = "apps/kitchen-api"
kind = "container"
min_instances = 1A container on Fargate
Every app runs on functions unless its table says otherwise. An app that needs an always-on container (work longer than 15 minutes, WebSockets, a worker that never stops) asks for it with two lines:
[run.apps.kitchen-live]
root = "apps/kitchen-live"
kind = "container"
runtime = "fargate" # without this line, the image runs as a function that scales to zero
cpu = 0.5
min_instances = 1A container on Fargate is billed for every hour it is on. When to choose it: Functions or containers.