jiayang.json schema
jiayang.json lives in the directory you deploy. Every field is optional except version. Every section refuses a field it doesn’t know, including $schema, so a typo is an error. jiayang.json shows it in use.
{ "version": 1, "kind": "worker", "build": { "install": "pnpm install --frozen-lockfile", "command": "pnpm build", "output": "dist" }, "worker": { "main": "src/worker.ts", "compatibility_date": "2026-09-01", "compatibility_flags": ["nodejs_compat"], "include": ["dist"], "wrangler_config": "wrangler.production.jsonc" }, "container": { "runtime": "python", "start": "uvicorn api.main:app --host 0.0.0.0 --port $PORT", "port": 8080, "instance_type": "lite" }}A real file has only the sections its kind uses. A flag on jiayang deploy beats the file, and the file beats the project’s wrangler config and detection.
Nothing in it opens a public path or sets a webhook verifier. Those are set in the dashboard only, so no deploy, an agent’s included, can put an app on the open internet.
version
Section titled “version”- Type: integer. Required.
- Value:
1.
A file with main, compatibility_date, include, port or instance_type at the top level is in the old flat format, and is refused with the rewrite printed. Any other file without version is refused with jiayang.json needs "version": 1. Any other number is refused: jiayang.json says version 2; this jiayang understands version 1.
- Type: string:
static,workerorcontainer. - Default: what detection decides.
- Overridden by:
--kind.
static and worker run on Workers, and container on Containers. An app can’t move between the two after it’s created.
How to turn the source into something deployable, run on your machine before anything goes up.
build.install
Section titled “build.install”- Type: string, a shell command.
- Default: the frozen install for your lockfile:
npm ci,pnpm install --frozen-lockfile,yarn install --immutableorbun install --frozen-lockfile. With no lockfile in the app, the one at the root of the workspace it belongs to. Otherwise none.
Runs only when there’s a package.json and no node_modules where it runs: the app’s directory, or the workspace’s root when the install comes from the root’s lockfile.
build.command
Section titled “build.command”- Type: string, a shell command, run in the app’s directory.
- Default:
npm run buildwhen package.json has abuildscript. For Next.js with@opennextjs/cloudflare,./node_modules/.bin/opennextjs-cloudflare build. For a container, none.
A container builds inside its image, so it runs nothing on your machine unless this is set. The command runs with the app’s environment variables and without Cloudflare credentials. It runs with sh -c, or cmd on Windows.
build.output
Section titled “build.output”- Type: string, a directory relative to the app.
- Default: the first of
dist,build,out,_site,.output/public,.vitepress/distanddocs/.vitepress/distthat exists after the build.publiconly when nothing is built. The app’s directory itself when there’s nothing to build.
Static sites only: the directory whose files are served. A build that ran and wrote none of the defaults stops the deploy and asks for this.
worker
Section titled “worker”For a Worker. Ignored for the other kinds.
worker.main
Section titled “worker.main”- Type: string, a path relative to the app.
- Default: the wrangler config’s
mainwhen the project has a wrangler config. Otherwise the first ofsrc/index.ts,index.ts,src/worker.tsandworker.ts, built with wrangler. Otherwise the first ofindex.js,index.mjs,src/index.js,src/index.mjs,dist/index.jsanddist/index.mjs. - Overridden by:
--main.
The entry module. A .ts entry in a project with no wrangler config is built with wrangler. Without a build, it must be a .js or .mjs ES module.
worker.compatibility_date
Section titled “worker.compatibility_date”- Type: string,
YYYY-MM-DD. - Default: the wrangler config’s, else
2026-09-01. - Overridden by:
--compatibility-date.
A real date, and not one in the future.
worker.compatibility_flags
Section titled “worker.compatibility_flags”- Type: array of strings.
- Default: the wrangler config’s flags, else none.
- Allowed:
nodejs_compat,nodejs_compat_v2,nodejs_als,global_fetch_strictly_public.
When set, the list replaces the wrangler config’s. Any other flag is refused before the build.
worker.include
Section titled “worker.include”- Type: array of strings, directories relative to the app.
- Default: the whole app.
The directories to take modules from, for a Worker that goes up without a build. Each has to be a real directory inside the app. A symlink, a missing directory or one that leads outside the app is refused.
worker.wrangler_config
Section titled “worker.wrangler_config”- Type: string, a file name.
- Default: whichever config wrangler finds itself, including one a build tool generated.
The wrangler config to build with, when the project has more than one or one with an unusual name. It must be a file beside the app ending in .json, .jsonc or .toml. Naming it passes it to wrangler with --config, so wrangler builds from that file rather than from a config a build tool generated.
container
Section titled “container”For a container. Ignored for the other kinds.
container.runtime
Section titled “container.runtime”- Type: string:
node,python,goorrust. - Default: from the project’s files:
nodewith a package.json,pythonwithrequirements.txt,pyproject.tomlorPipfile,gowithgo.mod,rustwithCargo.toml.
Which Dockerfile to write when the project has none. A project with its own Dockerfile builds from that, whatever this says.
container.start
Section titled “container.start”- Type: string, one line.
- Default:
npm startfor Node, the binary for Go and Rust, and for Python a command chosen from the framework (table).
The command the written Dockerfile runs. A plain program and its arguments run as they are. A command using shell syntax, such as $PORT or &&, runs through sh -c. Go’s image has no shell, so a Go start command has to be a plain one. A project with its own Dockerfile ignores this.
container.port
Section titled “container.port”- Type: integer, 1 to 65535.
- Default: the live version’s port, else
8080. - Overridden by:
--port.
The port the container listens on. It’s also in the container’s PORT variable.
container.instance_type
Section titled “container.instance_type”- Type: string:
lite,basic,standard-1,standard-2,standard-3orstandard-4. - Default: the live version’s size, else
basic. - Overridden by:
--instance-type.
The size the container runs at: Cloudflare Containers’ instance types, smallest first. The workspace’s plan decides which it can use: Team and Business run lite and basic, and a size the plan doesn’t run is refused before anything is built. See Limits.