Files
This page lists the files in your repository that Putnami Cloud reads, what each one owns, and its fields.
Each file owns one part of the contract between your code and the platform. Runtime, resources, configuration and automation stay in separate files, so a reviewer sees each change on its own.
Which file owns what
| File | Owns |
|---|---|
putnami.workspace.json |
Workspace-wide extensions and registries, and the committed link to the workspace |
<project>/putnami.json |
Project name, dependencies, publishable artifacts, and its Cloud options |
<project>/infra/runtime.json |
Whether a project deploys, and its ingress, scaling, resources and runtime security |
<project>/infra/requirements.json |
The databases, buckets, events, secrets and scheduled jobs the project needs |
<project>/schema/config.json |
The shape, types and visibility of the project's configuration |
<project>/conf/env.<env>.yaml |
Non-secret values of one environment |
putnami.ci.json |
CI commands, runner, publication rules, distribution and environments |
putnami.verdict-policy.json |
What each gap costs a change. See Verdict policy. |
.putnami/cloud-link.json, .putnami/cache.json |
Local copies of the link and the build cache settings |
A secret never goes in conf/env.<env>.yaml or in a committed file. Declare the requirement, then write the value with putnami cloud secrets set. See Config and secrets.
putnami.workspace.json
Owns the workspace-wide settings. putnami cloud setup writes the link.
| Field | Meaning |
|---|---|
options.@putnami/cloud.workspace.workspace_id |
The workspace this repository is linked to. Commit it. |
options.@putnami/cloud.workspace.control_plane_url |
The platform URL, only when it is not the default. |
registries.oci.publish |
The host and namespace your images publish to, such as oci.putnami.dev/acme. putnami cloud env doctor checks it. |
options.@putnami/cloud.distribution.ownerWorkspace |
For a workspace that consumes another workspace's channels: the owner's workspace id. Without it, the linked workspace is the owner. |
{
"options": {
"@putnami/cloud": {
"workspace": { "workspace_id": "05f74b66-a467-477d-baab-06e2b7a96c8c" }
}
},
"registries": { "oci": { "publish": "oci.putnami.dev/acme" } }
}<project>/putnami.json
Owns the project's identity and its Cloud options.
| Field | Meaning |
|---|---|
name |
The project id, such as apps/web. |
options["@putnami/cloud"].deploy.enabled |
true lets environments deploy this project when a channel moves. |
options["@putnami/cloud"].deploy.enforceHttpRoutes |
Opt in to path enforcement. Suspended: see HTTP route intent. |
options["@putnami/cloud:publish-config"].namespace |
The put namespace the project's config publishes to. |
options["@putnami/cloud:publish-migration"].namespace |
The put namespace the project's migration bundle publishes to. |
options.publish.dockerRegistry |
The registry your image publishes to: a bare host or a namespace under it. With nothing declared, oci.putnami.dev. |
options["@putnami/go"].deployment or options["@putnami/typescript"].deployment |
true ships the project's deployment declaration with each release set. Put it in the project's own putnami.json, not in the workspace file. |
A project with a deployment declaration needs deploy.enabled: true and a config publication namespace. When you turn the declaration on or off, or change it, the project rolls once on the next release.
{
"name": "apps/web",
"options": {
"@putnami/cloud": { "deploy": { "enabled": true } },
"@putnami/cloud:publish-config": { "namespace": "acme" },
"@putnami/go": { "deployment": true },
"publish": { "dockerRegistry": "oci.putnami.dev/acme" }
}
}infra/runtime.json
A project with this file is deployable. It declares how the platform runs the service.
| Field | Meaning |
|---|---|
ingress.domains |
The hosts the service answers on. There is no public default URL. A host is served when a certificate covers it and the workspace holds the host. Hosts under putnami.cloud and putnami.dev are covered. |
ingress.domain |
One host, as an alternative to domains. |
ingress.public |
false makes the service internal only, with no public URL. |
scaling.max |
The most instances that run at once. |
scaling.concurrency |
Requests one instance serves before the platform adds another. |
resources.cpu, resources.memory |
Resources of each instance, such as 1000m and 512Mi. |
resources.limits.cpu, resources.limits.memory |
Limits of each instance. |
security.platformAuth |
"disabled" when the service handles its own authentication. |
security.eventsGateway |
true when the service pulls or streams events for others and needs subscriber access. |
protocols.http2 |
false keeps the service on HTTP/1.1. |
There is no scaling.min. Idle services scale to zero. You cannot change this. A job that must continue after an HTTP response needs a job or worker, not a service.
{
"ingress": { "domains": ["service.example.com"] },
"scaling": { "max": 2, "concurrency": 500 },
"resources": { "cpu": "1000m", "memory": "512Mi" }
}See How your service runs and Add an environment.
HTTP route intent
A framework can write a route inventory to .gen/schema/http-routes.json. A deploy carries the file unchanged, checks its protocol (putnami.http-routes.v1) and digest before it provisions anything, and records it. A change to the routes only is release content: the deploy does not skip it.
Path enforcement is suspended. The platform routes by host and ignores path and method allowlists, so deploy.enforceHttpRoutes changes nothing today.
Do not edit generated files
Files under .gen/ are build outputs or inputs of a publication. Do not edit .gen/version.json, .gen/migration-bundle/, .gen/schema/http-routes.json or .gen/requirements.json. Change their source and run the build.
infra/requirements.json
Declares what the project needs. The platform makes the connection (the binding). Resource names and credentials stay with the platform. A framework generator writes this file; commit it.
| Field | Meaning |
|---|---|
protocolVersion |
2. Required. |
databases[] |
name, engine (postgres, mysql, sqlite or firestore), optional schemas. The platform hosts postgres. |
events.publishes[] |
Topics the project publishes. |
events.subscribes[] |
Topics the project subscribes to. An entry is a topic name, or {topic, delivery} with delivery of pull, stream or push. push posts each event to your service. |
storage[] |
Buckets: name, access (read, write or readwrite), optional public and retention (such as 30d). |
secrets[] |
Names of the secrets the project reads. |
scheduledJobs[] |
name, schedule (a 5-field cron expression such as 0 2 * * *), optional entrypoint. |
Names use lowercase letters, digits, -, _, . and /, at most 64 characters. A secret name may also use uppercase letters.
{
"$schema": "https://putnami.dev/schemas/putnami-infra.json",
"protocolVersion": 2,
"databases": [{ "name": "primary", "engine": "postgres", "schemas": ["orders"] }],
"events": { "publishes": ["acme.orders.created"] },
"storage": [{ "name": "uploads", "access": "readwrite" }],
"secrets": ["stripe_webhook_secret"],
"scheduledJobs": [{ "name": "nightly-rollup", "schedule": "0 2 * * *" }]
}See Database and migrations and Storage and events.
schema/config.json and conf/env.<env>.yaml
| File | Owns | Check it with |
|---|---|---|
schema/config.json |
The declared keys of the project: their types and visibility | putnami cloud config validate <project> --env prod |
conf/env.<env>.yaml |
The non-secret value of each key in one environment | putnami cloud config drift <project> |
config validate is local and read-only. It builds nothing and uses no network. Generate the build outputs first, so it does not read a stale schema. config publish writes the values to the platform.
putnami.ci.json
Owns the hosted CI pipeline, the channels it publishes and the environments that follow them. Write it with putnami cloud ci init. Check it with ci validate and ci fmt --check.
| Field | Meaning |
|---|---|
version |
3. Required. |
commands |
The jobs every run executes, in order: 1 to 32 names, such as lint, test, build, validate. An entry is a name, or {name, failOnError}; failOnError: false reports errors as warnings and the run passes. |
flags |
Flags added to the invocation, such as --enforce-coverage. |
runner |
selection (impacted or all) and timeoutMinutes. |
rules |
Which trigger publishes to which channels. At most 128. |
distribution |
What the repository declares to the release-set provider. |
envs |
The environments that follow a channel. At most 64. |
review |
Guidance for the review. See Set up review. |
rules
The first rule that matches a trigger applies. A trigger that matches no rule runs the commands and publishes nothing. A rule has one of branches, tags or pullRequests.
| Field | Meaning |
|---|---|
branches |
A glob or a list of globs. Selects a push to a matching branch. |
tags |
A glob or a list of globs. Selects a matching tag. |
pullRequests |
true selects every pull request. It is the only way a pull request publishes. |
publish |
The channels the run advances, or false to opt out of the tag convention. A pull request rule can use {number} once, as in pr-{number}. |
retain |
How long the channels live: while-open (only on a pull request rule whose channels all carry {number}), or 1d to 365d. |
baseline |
A channel the first publication of a pull request compares with when its own channel has no head. Putnami reads it and never moves it. It cannot appear in publish. |
{
"version": 3,
"commands": ["lint", "test", "build", "validate"],
"runner": { "selection": "impacted", "timeoutMinutes": 45 },
"rules": [
{ "pullRequests": true, "publish": ["pr-{number}"], "baseline": "canary" },
{ "branches": "main", "publish": ["canary"] }
]
}A push to a branch other than the default branch runs as its open pull request. With no open pull request, it runs only when a branches rule names that branch. The default branch and tags always run. baseline has no effect on a run with selection: all, on a tag run, or on a run that checks every project because it found no earlier commit.
distribution
| Field | Meaning |
|---|---|
namespace |
The repository's namespace at the release-set provider. Required. |
visibility |
internal (default), private or public. |
memberAttribution |
true records each member's source project and artifact kind. putnami cloud env doctor requires it for environments. |
memberSourceTree |
true records the git tree each member was built from. |
registries.<id> |
Per registry: visibility, and mirror.to, the external registry that receives public members. |
channels.<name> |
Per channel: visibility and protected. No rule may publish to a protected channel and no CI run may move it; only a person moves it. |
versions |
stable and prerelease: the visibility each version shape takes. |
members[] |
select (projects) and visibility: the visibility of those projects' members. At most 128. |
Turn memberAttribution and memberSourceTree on only when every extension the workspace pins knows the fields. An older consumer refuses them.
envs
An environment names the channel it follows and the workloads it owns. The key is a plain name such as prod.
| Field | Meaning |
|---|---|
<env>.channel |
The channel the environment follows. Without one, the environment deploys only when you ask. |
<env>.workloads[].select |
The exact paths of the projects the environment runs. A workload no rule selects is not part of the environment. At most 64 rules. |
<env>.workloads[].channel |
Overrides the channel for those workloads. An environment whose workloads end on different channels is not deployed by a move. |
{
"envs": {
"prod": {
"channel": "canary",
"workloads": [{ "select": ["apps/web-api", "apps/worker"] }]
}
}
}The platform reads the file from your connected repository at one commit and accepts it as a numbered revision. Merging a change to envs does not accept it: run putnami cloud env enable <env>. Until then, moves keep following the last accepted revision. See Add an environment and Env doctor checks.
rollout, constraints and variants are not offered. See Feature status.