From 903a4ea596a8e8b308b3ecb1d93e333fb36237db Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 09:15:01 +0100 Subject: [PATCH 1/7] fix(schema): sync Upsun config schema with the Upsun CLI Replace resources/validation/upsun.json (served at /schema/upsun) with the schema maintained by the Upsun CLI for `upsun lint` (internal/lint/schema/upsun-config-schema.json), which has been corrected against what the platform accepts. Notably, `stack` is now a mapping with `runtimes` and `packages` keys, or empty. Meta-specific changes on top of the CLI copy: - Keep the $refs to /schema/runtime-versions and /schema/service-versions for application and service types. - Also accept `composable:*` application types, which the runtime-versions enum does not include, so composable apps were always rejected. - Add `maxItems: 0` to `stack`, so a non-empty (legacy) list is rejected. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 1408 +++++++++++++++++++++---------- 1 file changed, 967 insertions(+), 441 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index b73ffc16..ff9d102d 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -4,163 +4,25 @@ "type": "object", "properties": { "applications": { - "description": "For more information, see https://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#primary-application-properties", + "description": "For more information, see https://docs.upsun.com/anchors/app/reference/root-keys/", "additionalProperties": { "type": "object", "properties": { - "resources": {"$ref": "#/definitions/deprecated/resources"}, - "container_profile": {"$ref": "#/definitions/container_profile"}, - "access": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Access control for roles accessing app environments", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#access", - "default": { - "ssh": "contributor" - } - }, - "relationships": {"$ref": "#/definitions/relationships"}, - "mounts": {"$ref": "#/definitions/mounts"}, - "timezone": { - "type": "string", - "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/create-apps/timezone.html", - "default": null - }, - "variables": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": {} - }, - "title": "Variables to control the environment", - "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#variables", - "default": {} - }, - "firewall": {"$ref": "#/definitions/firewall"}, "type": { - "allOf": [ - { "$ref": "https://meta.upsun.com/schema/runtime-versions" } - ], - "title": "The base runtime (language) and version to use for this application", - "description": "The base image to use with a specific app language. \nFormat: runtime:version. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#types" - }, - "runtime": { - "type": "object", - "title": "Runtime-specific configuration", - "description": "Customizations to your PHP or Lisp runtime. \nContains a runtime dictionary: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#runtime", - "properties": { - "extensions": { - "type": "array", - "title": "PHP extensions to enable", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#extensions", - "default": [] - }, - "disabled_extensions": { - "type": "array", - "title": "PHP extensions to disable", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#extensions", - "default": [] - }, - "request_terminate_timeout": { - "type": "integer", - "title": "PHP timeout to terminate requests", - "description": "The timeout in seconds for serving a single request after which the PHP-FPM worker process is killed." - }, - "sizing_hints": { - "type": "object", - "title": "A sizing hints definition", - "description": "The assumptions for setting the number of workers in your PHP-FPM runtime. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#sizing-hints", - "properties": { - "request_memory": { - "type": "integer", - "title": "The average memory consumed per request in MB", - "description": "Minimum to 10", - "default": 45, - "minimum": 10 - }, - "reserved_memory": { - "type": "integer", - "title": "The amount of memory reserved in MB", - "description": "Minimum to 70", - "default": 70, - "minimum": 70 - } - }, - "additionalProperties": false - }, - "xdebug": { - "type": "object", - "title": "An Xdebug definition", - "description": "The setting to turn on Xdebug. \nMore information: \nhttps://docs.upsun.com/languages/php/xdebug.html", - "properties": { - "idekey": { - "type": "string", - "title": "Your Xdebug key" - } - } - }, - "quicklisp": { - "type": "object", - "title": "Distributions for QuickLisp to use", - "description": "More information: \nhttps://docs.upsun.com/languages/lisp.html#quicklisp-options", - "deprecationMessage": "Lisp image no longer exists, please see \nhttps://devcenter.upsun.com/posts/deploying-with-lisp/ \n for more information" - } - } - }, - "preflight": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Whether the preflight security blocks are enabled", - "description": "Must be a boolean" + "type": "string", + "anyOf": [ + { + "$ref": "https://meta.upsun.com/schema/runtime-versions" }, - "ignored_rules": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Specific rules to ignore during preflight security checks", - "default": [] + { + "pattern": "^composable:" } - }, - "required": [ - "enabled" ], - "additionalProperties": false, - "description": "Configuration for pre-flight checks", - "default": { - "enabled": true, - "ignored_rules": [] - } - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "type": "object" - }, - "title": "External global dependencies of this application", - "description": "What global dependencies to install before the build `hook` is run. They will be downloaded by the language's package manager. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#dependencies", - "default": {} + "title": "The base runtime (language) and version to use for this application", + "description": "The base image to use with a specific app language. \nFormat: runtime:version. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/type/" }, - "build": { - "type": "object", - "properties": { - "flavor": { - "type": "string", - "description": "The pre-set build tasks to use for this application", - "default": null - } - }, - "additionalProperties": false, - "title": "The build configuration of the application", - "description": "It contains a build dictionary. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#build", - "default": { - "flavor": null - } + "stack": { + "$ref": "#/definitions/stack" }, "source": { "type": "object", @@ -168,7 +30,7 @@ "root": { "type": "string", "title": "The root of the application relative to the repository root", - "description": " \nDefaults to the root project directory. \nUseful for multi-app setups: \nhttps://docs.upsun.com/create-apps/multi-app.html", + "description": " \nDefaults to the root project directory. \nUseful for multi-app setups: \nhttps://docs.upsun.com/anchors/app/multiple/", "default": null }, "operations": { @@ -179,7 +41,7 @@ "command": { "type": "string", "title": "Operations that can be applied to the source code", - "description": "More information: \nhttps://docs.upsun.com/create-apps/source-operations.html" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/source-operations/" } }, "required": [ @@ -193,16 +55,25 @@ }, "additionalProperties": false, "title": "Information on the app’s source code and operations that can be run on it", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#source", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/source/operations/", "default": { "operations": {}, "root": null } }, + "resources": { + "$ref": "#/definitions/deprecated/resources" + }, + "relationships": { + "$ref": "#/definitions/relationships" + }, + "mounts": { + "$ref": "#/definitions/mounts" + }, "web": { "type": "object", "title": "How the web application is served", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#web", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/", "properties": { "variables": { "type": "object", @@ -218,18 +89,26 @@ "title": "The timezone of the application", "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." }, - "mounts": {"$ref": "#/definitions/mounts"}, - "relationships": {"$ref": "#/definitions/relationships"}, + "mounts": { + "$ref": "#/definitions/mounts" + }, + "relationships": { + "$ref": "#/definitions/relationships" + }, "access": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Access information, a mapping between access type and roles", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#access" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/access/" + }, + "size": { + "$ref": "#/definitions/deprecated/size" + }, + "resources": { + "$ref": "#/definitions/deprecated/resources" }, - "size": {"$ref": "#/definitions/deprecated/size"}, - "resources": {"$ref": "#/definitions/deprecated/resources"}, "locations": { "type": "object", "additionalProperties": { @@ -238,11 +117,14 @@ "root": { "type": "string", "title": "The folder from which to serve static assets for this location relative to the application root", - "description": "The directory to serve static assets for this location relative to the app’s root directory. Must be an actual directory inside the root directory. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#root-directory", + "description": "The directory to serve static assets for this location relative to the app’s root directory. Must be an actual directory inside the root directory. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/source/root/", "default": "public" }, "expires": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "Amount of time to cache static assets", "description": "How long static assets are cached. The default means no caching. Setting it to a value enables the `Cache-Control` and `Expires` headers. Times can be suffixed with `ms` = milliseconds, `s` = seconds, `m` = minutes, `h` = hours, `d` = days, `w` = weeks, `M` = months/30d, or `y` = years/365d. If a `Cache-Control` appears on the `headers` configuration, `expires`, if set, will be ignored. Thus, make sure to set the `Cache-Control`’s `max-age` value when specifying a the header.", "default": -1 @@ -281,7 +163,7 @@ "type": "string" }, "title": "A set of header fields set to the HTTP response", - "description": "Any additional headers to apply to static assets, mapping header names to values. Responses from the app aren’t affected. \nSee how to set custom headers on static content: \nhttps://docs.upsun.com/create-apps/web/custom-headers.html", + "description": "Any additional headers to apply to static assets, mapping header names to values. Responses from the app aren’t affected. \nSee how to set custom headers on static content: \nhttps://docs.upsun.com/anchors/app/web/custom-headers/", "default": {} }, "rules": { @@ -290,7 +172,10 @@ "type": "object", "properties": { "expires": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "Amount of time to cache static assets", "description": "How long static assets are cached. The default means no caching. Setting it to a value enables the `Cache-Control` and `Expires` headers. Times can be suffixed with `ms` = milliseconds, `s` = seconds, `m` = minutes, `h` = hours, `d` = days, `w` = weeks, `M` = months/30d, or `y` = years/365d. If a `Cache-Control` appears on the `headers` configuration, `expires`, if set, will be ignored. Thus, make sure to set the `Cache-Control`’s `max-age` value when specifying a the header.", "default": -1 @@ -321,13 +206,13 @@ "type": "string" }, "title": "A set of header fields set to the HTTP response", - "description": "Any additional headers to apply to static assets, mapping header names to values. Responses from the app aren’t affected. \nSee how to set custom headers on static content: \nhttps://docs.upsun.com/create-apps/web/custom-headers.html" + "description": "Any additional headers to apply to static assets, mapping header names to values. Responses from the app aren’t affected. \nSee how to set custom headers on static content: \nhttps://docs.upsun.com/anchors/app/web/custom-headers/" } }, "additionalProperties": false }, "title": "Specific overrides for specific locations", - "description": "Contains a rules dictionary. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#rules", + "description": "Contains a rules dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/locations/rules/", "default": {} }, "request_buffering": { @@ -341,19 +226,19 @@ "max_request_size": { "type": "string", "title": "The maximum size request that can be buffered", - "description": "Supports K, M, and G suffixes. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#request-buffering", + "description": "Supports K, M, and G suffixes. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/", "default": 262144000 } }, "additionalProperties": false, "title": "Configuration for supporting request buffering.", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#request-buffering" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/" } }, "additionalProperties": false }, "title": "The specification of the web locations served by this application", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#web", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/", "default": {} }, "commands": { @@ -367,15 +252,17 @@ "start": { "type": "string", "title": "The command used to start the application", - "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP or FrankenPHP. \nSee note: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#required-command" + "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP or FrankenPHP. \nSee note: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/start/" + }, + "post_start": { + "type": "string", + "title": "A command executed after the application is started", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/" } }, - "required": [ - "start" - ], "additionalProperties": false, "title": "The command to launch your app", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#web-commands" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/" }, "upstream": { "type": "object", @@ -383,7 +270,7 @@ "socket_family": { "type": "string", "title": "Whether your app listens on a Unix or TCP socket", - "description": "If `tcp`, check the PORT environment variable on application startup. If `unix`, check SOCKET. \nMore Information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#upstream", + "description": "If `tcp`, check the PORT environment variable on application startup. If `unix`, check SOCKET. \nMore Information: \nhttps://docs.upsun.com/anchors/app/reference/web/upstream/", "default": "tcp" }, "protocol": { @@ -394,7 +281,7 @@ }, "additionalProperties": false, "title": "Configuration on how the web server communicates with the application", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#upstream" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/upstream/" }, "document_root": { "type": "string", @@ -431,7 +318,10 @@ "deprecationMessage": "Deprecated" }, "expires": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "Amount of time to cache static assets", "deprecationMessage": "Deprecated" }, @@ -440,6 +330,15 @@ "title": "Whether to move the whole root of the app to the document root", "default": false, "deprecationMessage": "Deprecated" + }, + "authorizations": { + "$ref": "#/definitions/authorizations" + }, + "egress": { + "$ref": "#/definitions/egress" + }, + "container_profile": { + "$ref": "#/definitions/container_profile" } }, "additionalProperties": false, @@ -447,33 +346,122 @@ "locations": {} } }, - "operations": { + "workers": { "type": "object", "additionalProperties": { "type": "object", "properties": { + "firewall": { + "$ref": "#/definitions/firewall" + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables to control the environment", + "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/variables/", + "default": {} + }, + "timezone": { + "type": "string", + "title": "The timezone of the application", + "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", + "default": null + }, + "mounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "source": { + "type": "string", + "title": "The type of mount that will provide the data", + "description": "- By design, `storage` mounts can be shared between instances of the same app \n- `instance` (or `local`) mounts are local mounts \n- `tmp` (or `temporary`) mounts are local ephemeral mounts \n- `service` mounts can be useful if you want to explicitly define and use a Network Storage service", + "enum": [ + "instance", + "local", + "service", + "storage", + "temporary", + "tmp" + ] + }, + "source_path": { + "type": "string", + "title": "The path to be mounted", + "description": "Path relative to the root directory of the volume that's being mounted from. \nWARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/anchors/app/reference/mounts/change-name/" + }, + "service": { + "type": "string", + "title": "The name of the service that the volume will be mounted from", + "description": "Must be a service in `services.yaml` of type `network-storage`." + } + }, + "required": [ + "source" + ], + "additionalProperties": false + }, + "title": "Filesystem mounts of this application", + "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/", + "default": {} + }, + "relationships": { + "$ref": "#/definitions/relationships" + }, + "access": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Access control for roles accessing app environments", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/access/", + "default": { + "ssh": "contributor" + } + }, + "size": { + "$ref": "#/definitions/deprecated/size" + }, + "resources": { + "$ref": "#/definitions/deprecated/resources" + }, + "container_profile": { + "$ref": "#/definitions/container_profile" + }, "commands": { "type": "object", "properties": { + "pre_start": { + "type": "string", + "title": "The command used to run before starting the application", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" + }, "start": { "type": "string", "title": "The command used to start the application", - "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." + "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" + }, + "post_start": { + "type": "string", + "title": "A command executed after the application is started", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" } }, "required": [ "start" - ] + ], + "additionalProperties": false, + "title": "The commands to manage the worker", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, - "role": { - "type": "string", - "title": "which users can trigger it according to their user role", - "description": "More information: \nhttps://docs.upsun.com/create-apps/runtime-operations.html#define-a-runtime-operation", - "enum": [ - "viewer", - "contributor", - "admin" - ] + "authorizations": { + "$ref": "#/definitions/authorizations" + }, + "egress": { + "$ref": "#/definitions/egress" } }, "required": [ @@ -481,35 +469,84 @@ ], "additionalProperties": false }, - "title": "Runtime operations that can be executed in the application container", - "description": "More information: \nhttps://docs.upsun.com/create-apps/runtime-operations.html", + "title": "Alternate copies of the application to run as background processes", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", "default": {} }, - "hooks": { + "access": { "type": "object", - "properties": { - "build": { - "type": "string", - "title": "Hook executed after the build process", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#hooks", - "default": null - }, - "deploy": { - "type": "string", - "title": "Hook executed after the deployment of new code", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#hooks", - "default": null - }, + "additionalProperties": { + "type": "string" + }, + "title": "Access control for roles accessing app environments", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/access/", + "default": { + "ssh": "contributor" + } + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables to control the environment", + "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/variables/", + "default": {} + }, + "firewall": { + "$ref": "#/definitions/firewall" + }, + "build": { + "type": "object", + "properties": { + "flavor": { + "type": "string", + "description": "The pre-set build tasks to use for this application", + "default": null + } + }, + "additionalProperties": false, + "title": "The build configuration of the application", + "description": "It contains a build dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/build/", + "default": { + "flavor": null + } + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "title": "External global dependencies of this application", + "description": "What global dependencies to install before the build `hook` is run. They will be downloaded by the language's package manager. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/dependencies/", + "default": {} + }, + "hooks": { + "type": "object", + "properties": { + "build": { + "type": "string", + "title": "Hook executed after the build process", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", + "default": null + }, + "deploy": { + "type": "string", + "title": "Hook executed after the deployment of new code", + "description": "More information: \nhttps://docs.upsun.com\t\n/anchors/app/reference/hooks/", + "default": null + }, "post_deploy": { "type": "string", "title": "Hook executed after an environment is fully deployed", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#hooks", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", "default": null } }, "additionalProperties": false, "title": "What commands run at different stages in the `build`, `deploy` and `post_deploy` process", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#hooks", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", "default": {} }, "crons": { @@ -542,7 +579,7 @@ ], "additionalProperties": false, "title": "A definition of what commands to run when starting and stopping the cron job", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#cron-commands" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/crons/commands/" }, "shutdown_timeout": { "type": "integer", @@ -554,6 +591,7 @@ "type": "integer", "title": "The cron timeout", "description": "The maximum amount of time a cron can run before it’s terminated. Defaults to the maximum allowed value of `86400` seconds (24 hours).", + "minimum": 1, "maximum": 86400 }, "cmd": { @@ -568,107 +606,153 @@ "additionalProperties": false }, "title": "Scheduled cron tasks executed by this application", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#crons", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/crons/", "default": {} }, - "workers": { + "runtime": { "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "firewall": {"$ref": "#/definitions/firewall"}, - "variables": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": {} - }, - "title": "Variables to control the environment", - "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#variables", - "default": {} - }, - "timezone": { - "type": "string", - "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/create-apps/timezone.html", - "default": null - }, - "mounts": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "source": { - "type": "string", - "title": "The type of mount that will provide the data", - "description": "- By design, `storage` mounts can be shared between instances of the same app \n- `instance` mounts are local mounts \n- `tmp` (or `temporary`) mounts are local ephemeral mounts \n- `service` mounts can be useful if you want to explicitly define and use a Network Storage service", - "enum": [ - "instance", - "service", - "storage", - "temporary", - "tmp" - ] - }, - "source_path": { - "type": "string", - "title": "The path to be mounted", - "description": "Path relative to the root directory of the volume that's being mounted from. \nWARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#ensure-continuity-when-changing-the-name-of-your-mount" - }, - "service": { - "type": "string", - "title": "The name of the service that the volume will be mounted from", - "description": "Must be a service in `services.yaml` of type `network-storage`." - } - }, - "required": [ - "source" - ], - "additionalProperties": false + "title": "Runtime-specific configuration", + "description": "Customizations to your PHP or Lisp runtime. \nContains a runtime dictionary: \nhttps://docs.upsun.com/anchors/app/reference/runtime/", + "properties": { + "extensions": { + "type": "array", + "title": "PHP extensions to enable", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", + "default": [] + }, + "disabled_extensions": { + "type": "array", + "title": "PHP extensions to disable", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", + "default": [] + }, + "request_terminate_timeout": { + "type": "integer", + "title": "PHP timeout to terminate requests", + "description": "The timeout in seconds for serving a single request after which the PHP-FPM worker process is killed." + }, + "sizing_hints": { + "type": "object", + "title": "A sizing hints definition", + "description": "The assumptions for setting the number of workers in your PHP-FPM runtime. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/runtime/sizing-hints/", + "properties": { + "request_memory": { + "type": "integer", + "title": "The average memory consumed per request in MB", + "description": "Minimum to 10", + "default": 45, + "minimum": 10 }, - "title": "Filesystem mounts of this application", - "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#mounts", - "default": {} + "reserved_memory": { + "type": "integer", + "title": "The amount of memory reserved in MB", + "description": "Minimum to 70", + "default": 70, + "minimum": 70 + } }, - "relationships": {"$ref": "#/definitions/relationships"}, - "access": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Access control for roles accessing app environments", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#access", - "default": { - "ssh": "contributor" + "additionalProperties": false + }, + "xdebug": { + "type": "object", + "title": "An Xdebug definition", + "description": "The setting to turn on Xdebug. \nMore information: \nhttps://docs.upsun.com/anchors/languages/php/xdebug/", + "properties": { + "idekey": { + "type": "string", + "title": "Your Xdebug key" } + } + }, + "quicklisp": { + "type": "object", + "title": "Distributions for QuickLisp to use", + "description": "More information: \nhttps://docs.upsun.com/anchors/languages/lisp/", + "deprecationMessage": "Lisp image no longer exists, please see \nhttps://devcenter.upsun.com/posts/deploying-with-lisp/ \n for more information" + } + } + }, + "container_profile": { + "$ref": "#/definitions/container_profile" + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Maps of hostnames to IP addresses", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/additional-hosts/" + }, + "timezone": { + "type": "string", + "title": "The timezone of the application", + "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", + "default": null + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the preflight security blocks are enabled", + "description": "Must be a boolean" + }, + "ignored_rules": { + "type": "array", + "items": { + "type": "string" }, - "size": {"$ref": "#/definitions/deprecated/size"}, - "resources": {"$ref": "#/definitions/deprecated/resources"}, + "title": "Specific rules to ignore during preflight security checks", + "default": [] + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "description": "Configuration for pre-flight checks", + "default": { + "enabled": true, + "ignored_rules": [] + } + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { "commands": { "type": "object", "properties": { - "pre_start": { - "type": "string", - "title": "The command used to run before starting the application", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers" - }, "start": { "type": "string", "title": "The command used to start the application", - "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers" + "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." }, - "post_start": { + "stop": { "type": "string", - "title": "A command executed after the application is started", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers" + "description": "The command used to stop the operation." } }, "required": [ "start" - ], - "additionalProperties": false, - "title": "The commands to manage the worker", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers" + ] + }, + "role": { + "type": "string", + "title": "which users can trigger it according to their user role", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/define/", + "enum": [ + "viewer", + "contributor", + "admin" + ] + }, + "timeout": { + "type": "integer", + "minimum": 1, + "maximum": 86400, + "description": "The maximum duration in seconds." } }, "required": [ @@ -676,149 +760,387 @@ ], "additionalProperties": false }, - "title": "Alternate copies of the application to run as background processes", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers", + "title": "Runtime operations that can be executed in the application container", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/", + "default": {} + }, + "authorizations": { + "$ref": "#/definitions/authorizations" + }, + "egress": { + "$ref": "#/definitions/egress" + }, + "image": { + "$ref": "#/definitions/image" + } + }, + "anyOf": [ + { + "required": [ + "type" + ] + }, + { + "required": [ + "type", + "stack" + ] + } + ], + "additionalProperties": false, + "x-order": [ + "type", + "stack", + "source", + "resources", + "relationships", + "mounts", + "web", + "workers", + "access", + "variables", + "firewall", + "build", + "dependencies", + "hooks", + "crons", + "runtime", + "container_profile", + "additional_hosts", + "timezone", + "preflight", + "operations" + ] + } + }, + "routes": { + "title": "The routes of the project", + "description": "Each route describes how an incoming URL is going to be processed by Upsun. \nMore information: \nhttps://docs.upsun.com/anchors/routes/", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "title": "Route identifier", + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/identifiers/", + "properties": { + "primary": { + "$ref": "#/definitions/routes/primary" + }, + "id": { + "$ref": "#/definitions/routes/id" + }, + "attributes": { + "$ref": "#/definitions/routes/attributes" + }, + "type": { + "$ref": "#/definitions/routes/route_type" + }, + "redirects": { + "$ref": "#/definitions/routes/redirects" + }, + "tls": { + "$ref": "#/definitions/routes/tls" + }, + "to": { + "$ref": "#/definitions/routes/to" + } + }, + "required": [ + "type", + "to" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "primary": { + "$ref": "#/definitions/routes/primary" + }, + "id": { + "$ref": "#/definitions/routes/id" + }, + "attributes": { + "$ref": "#/definitions/routes/attributes" + }, + "type": { + "$ref": "#/definitions/routes/route_type" + }, + "redirects": { + "$ref": "#/definitions/routes/redirects" + }, + "tls": { + "$ref": "#/definitions/routes/tls" + }, + "cache": { + "$ref": "#/definitions/routes/cache" + }, + "ssi": { + "$ref": "#/definitions/routes/ssi" + }, + "upstream": { + "$ref": "#/definitions/routes/upstream" + } + }, + "required": [ + "type", + "upstream" + ], + "additionalProperties": false + } + ] + } + }, + "services": { + "title": "The services of the project", + "description": "Each service listed will be deployed to power your Upsun project. \nMore information: \nhttps://docs.upsun.com/anchors/services/ \nFull list of available services: \nhttps://docs.upsun.com/anchors/services/available/", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "allOf": [ + { + "$ref": "https://meta.upsun.com/schema/service-versions" + } + ], + "title": "The service type", + "description": "One of the available services in the format `type:version`. \nMore information: \nhttps://docs.upsun.com/anchors/services/available/", + "default": {} + }, + "size": { + "$ref": "#/definitions/deprecated/size" + }, + "access": { + "type": "object", + "title": "The configuration of the service", + "default": {}, + "deprecationMessage": "Deprecated" + }, + "configuration": { + "type": "object", + "title": "The configuration of the service", + "description": "Some services have additional specific configuration options that can be defined here, such as specific endpoints. \nSee the given service page for more details: \nhttps://docs.upsun.com/anchors/services/available/.", "default": {} }, + "relationships": { + "$ref": "#/definitions/relationships" + }, + "firewall": { + "$ref": "#/definitions/firewall" + }, + "resources": { + "$ref": "#/definitions/deprecated/resources" + }, + "container_profile": { + "$ref": "#/definitions/container_profile" + } + }, + "required": [ + "type" + ], + "additionalProperties": false + } + }, + "tasks": { + "title": "The tasks of the project", + "description": "On-demand, run-to-completion workloads.\nMore information:\nhttps://developer.upsun.com/docs/configure-apps/tasks", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "properties": { "additional_hosts": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Maps of hostnames to IP addresses", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#additional-hosts" + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/additional-hosts/" }, - "stack": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } + "authorizations": { + "$ref": "#/definitions/authorizations" + }, + "base": { + "type": "string", + "title": "A built-in task definition to use", + "description": "When set, no other property is allowed." + }, + "container_profile": { + "$ref": "#/definitions/container_profile" + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "title": "External global dependencies of this application", + "description": "What global dependencies to install before the build `hook` is run. They will be downloaded by the language's package manager. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/dependencies/", + "default": {} + }, + "egress": { + "$ref": "#/definitions/egress" + }, + "hooks": { + "type": "object", + "properties": { + "build": { + "type": [ + "string", + "null" + ], + "description": "Run during the environment build, producing a slug reused across runs." + }, + "deploy": { + "type": [ + "string", + "null" + ], + "description": "Run before the task's run command." } - ], - "title": "Composable Image definition", - "description": "A list of packages from the Upsun collection of supported runtimes and/or from NixPkgs. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/composable-image.html" - } - }, - "anyOf": [ - { - "required": [ - "type" - ] + }, + "additionalProperties": false }, - { - "required": [ - "type", - "stack" - ] - } - ], - "additionalProperties": false - } - }, - "routes": { - "title": "The routes of the project", - "description": "Each route describes how an incoming URL is going to be processed by Upsun. \nMore information: \nhttps://docs.upsun.com/define-routes.html", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "oneOf": [ - { + "image": { + "$ref": "#/definitions/image" + }, + "mounts": { + "$ref": "#/definitions/mounts" + }, + "relationships": { + "$ref": "#/definitions/relationships" + }, + "resources": { + "$ref": "#/definitions/deprecated/resources" + }, + "run": { "type": "object", - "title": "Route identifier", - "description": "More information: \nhttps://docs.upsun.com/define-routes.html#route-identifiers", "properties": { - "primary": {"$ref": "#/definitions/routes/primary"}, - "id": {"$ref": "#/definitions/routes/id"}, - "attributes": {"$ref": "#/definitions/routes/attributes"}, - "type": {"$ref": "#/definitions/routes/route_type"}, - "redirects": {"$ref": "#/definitions/routes/redirects"}, - "tls": {"$ref": "#/definitions/routes/tls"}, - "to": {"$ref": "#/definitions/routes/to"} + "command": { + "type": "string", + "minLength": 1, + "description": "The command to execute. It runs to completion, not as a daemon." + }, + "timeout": { + "type": "integer", + "minimum": 1, + "maximum": 86400, + "description": "The maximum duration in seconds. Defaults to 3600." + } }, "required": [ - "type", - "to" + "command" ], "additionalProperties": false }, - { + "runtime": { + "type": "object", + "title": "Runtime-specific configuration", + "description": "Customizations to your PHP or Lisp runtime. \nContains a runtime dictionary: \nhttps://docs.upsun.com/anchors/app/reference/runtime/", + "properties": { + "extensions": { + "type": "array", + "title": "PHP extensions to enable", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", + "default": [] + }, + "disabled_extensions": { + "type": "array", + "title": "PHP extensions to disable", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", + "default": [] + }, + "request_terminate_timeout": { + "type": "integer", + "title": "PHP timeout to terminate requests", + "description": "The timeout in seconds for serving a single request after which the PHP-FPM worker process is killed." + }, + "sizing_hints": { + "type": "object", + "title": "A sizing hints definition", + "description": "The assumptions for setting the number of workers in your PHP-FPM runtime. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/runtime/sizing-hints/", + "properties": { + "request_memory": { + "type": "integer", + "title": "The average memory consumed per request in MB", + "description": "Minimum to 10", + "default": 45, + "minimum": 10 + }, + "reserved_memory": { + "type": "integer", + "title": "The amount of memory reserved in MB", + "description": "Minimum to 70", + "default": 70, + "minimum": 70 + } + }, + "additionalProperties": false + }, + "xdebug": { + "type": "object", + "title": "An Xdebug definition", + "description": "The setting to turn on Xdebug. \nMore information: \nhttps://docs.upsun.com/anchors/languages/php/xdebug/", + "properties": { + "idekey": { + "type": "string", + "title": "Your Xdebug key" + } + } + }, + "quicklisp": { + "type": "object", + "title": "Distributions for QuickLisp to use", + "description": "More information: \nhttps://docs.upsun.com/anchors/languages/lisp/", + "deprecationMessage": "Lisp image no longer exists, please see \nhttps://devcenter.upsun.com/posts/deploying-with-lisp/ \n for more information" + } + } + }, + "source": { "type": "object", "properties": { - "primary": {"$ref": "#/definitions/routes/primary"}, - "id": {"$ref": "#/definitions/routes/id"}, - "attributes": {"$ref": "#/definitions/routes/attributes"}, - "type": {"$ref": "#/definitions/routes/route_type"}, - "redirects": {"$ref": "#/definitions/routes/redirects"}, - "tls": {"$ref": "#/definitions/routes/tls"}, - "cache": {"$ref": "#/definitions/routes/cache"}, - "ssi": {"$ref": "#/definitions/routes/ssi"}, - "upstream": {"$ref": "#/definitions/routes/upstream"} + "root": { + "type": "string", + "description": "The subdirectory containing the task's code. Defaults to `/`." + } }, - "required": [ - "type", - "upstream" - ], "additionalProperties": false - } - ] - } - }, - "services": { - "title": "The services of the project", - "description": "Each service listed will be deployed to power your Upsun project. \nMore information: \nhttps://docs.upsun.com/add-services.html \nFull list of available services: \nhttps://docs.upsun.com/add-services.html#available-services", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "object", - "properties": { - "type": { + }, + "stack": { + "$ref": "#/definitions/stack" + }, + "timezone": { "type": "string", - "title": "The service type", - "description": "One of the available services in the format `type:version`. \nMore information: \nhttps://docs.upsun.com/add-services.html#available-services", - "allOf": [ - { "$ref": "https://meta.upsun.com/schema/service-versions" } - ] + "title": "The timezone of the application", + "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", + "default": null }, - "size": {"$ref": "#/definitions/deprecated/size"}, - "access": { - "type": "object", - "title": "The configuration of the service", - "default": {}, - "deprecationMessage": "Deprecated" + "type": { + "type": "string", + "title": "The runtime image and version to use for this task", + "description": "The base image to use with a specific app language. \nFormat: runtime:version. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/type/" }, - "configuration": { + "variables": { "type": "object", - "title": "The configuration of the service", - "description": "Some services have additional specific configuration options that can be defined here, such as specific endpoints. \nSee the given service page for more details: \nhttps://docs.upsun.com/add-services.html#available-services.", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables to control the environment", + "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/variables/", "default": {} - }, - "relationships": {"$ref": "#/definitions/relationships"}, - "firewall": {"$ref": "#/definitions/firewall"}, - "resources": {"$ref": "#/definitions/deprecated/resources"}, - "container_profile": {"$ref": "#/definitions/container_profile"} + } }, - "required": [ - "type" - ], "additionalProperties": false } } @@ -826,7 +1148,7 @@ "required": [ "applications" ], - "additionalProperties": true, + "additionalProperties": false, "definitions": { "container_profile": { "type": [ @@ -834,7 +1156,7 @@ "null" ], "title": "The container profile for this application/service in production", - "description": "Leave blank to allow it to be set dynamically. \nMore information: \nhttps://docs.upsun.com/manage-resources/adjust-resources.html#adjust-a-container-profile", + "description": "Leave blank to allow it to be set dynamically. \nMore information: \nhttps://docs.upsun.com/anchors/resources/manage/configuration/profiles/adjust/", "default": "", "anyOf": [ { @@ -861,7 +1183,7 @@ "id": { "type": "string", "title": "Route Identifier", - "description": "A unique identifier for the route. See route identifiers: \nhttps://docs.upsun.com/define-routes.html#route-identifiers", + "description": "A unique identifier for the route. See route identifiers: \nhttps://docs.upsun.com/anchors/routes/identifiers/", "default": null }, "attributes": { @@ -870,7 +1192,7 @@ "additionalProperties": { "type": "string" }, - "description": "Arbitrary attributes attached to this resource: \nhttps://docs.upsun.com/define-routes.html#route-attributes", + "description": "Arbitrary attributes attached to this resource: \nhttps://docs.upsun.com/anchors/routes/attributes/", "default": {} }, "route_type": { @@ -879,7 +1201,7 @@ "null" ], "title": "Route type", - "description": "More information: \nhttps://docs.upsun.com/define-routes.html#route-configuration-reference", + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/configuration/", "enum": [ "proxy", "redirect", @@ -890,54 +1212,60 @@ "redirects": { "type": "object", "title": "The configuration of the redirects", - "description": "Defines redirects for partial routes. For definition and options, see the redirect rules: \nhttps://docs.upsun.com/define-routes/redirects.html", + "description": "Defines redirects for partial routes. For definition and options, see the redirect rules: \nhttps://docs.upsun.com/anchors/routes/redirects/", "properties": { "expires": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "The duration the redirect is cached", - "description": "Examples of valid values include 3600s, 1d, 2w, 3m. \nTo disable caching for all your redirects, set expires to 0. You can also disable caching on a specific redirect: \nhttps://docs.upsun.com/define-routes/redirects.html#disable-caching-on-your-redirects", + "description": "Examples of valid values include 3600s, 1d, 2w, 3m. \nTo disable caching for all your redirects, set expires to 0. You can also disable caching on a specific redirect: \nhttps://docs.upsun.com/anchors/routes/redirects/caching/disable/", "default": -1 }, "paths": { "type": "object", "title": "The paths to redirect", - "description": "More information: \nhttps://docs.upsun.com/define-routes/redirects.html#partial-redirects", + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/", "additionalProperties": { "type": "object", "properties": { "regexp": { "type": "boolean", "title": "Whether the path is a regular expression", - "description": "Specifies whether the path key should be interpreted as a PCRE regular expression. \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#partial-redirects", + "description": "Specifies whether the path key should be interpreted as a PCRE regular expression. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/", "default": false }, "to": { "type": "string", "title": "The URL to redirect to", - "description": "A relative URL - '/destination', \nor absolute URL - 'https://example.com/'. \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#partial-redirects" + "description": "A relative URL - '/destination', \nor absolute URL - 'https://example.com/'. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/" }, "prefix": { "type": "boolean", "title": "Prefix of the redirect path", - "description": "Specifies whether both the path and all its children or just the path itself should be redirected. \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#redirects-using-prefix-and-append_suffix", + "description": "Specifies whether both the path and all its children or just the path itself should be redirected. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/affix/", "default": null }, "append_suffix": { "type": "boolean", "title": "Suffix of the redirect path", - "description": "Determines if the suffix is carried over with the redirect. More information. \nhttps://docs.upsun.com/define-routes/redirects.html#redirects-using-prefix-and-append_suffix", + "description": "Determines if the suffix is carried over with the redirect. More information. \nhttps://docs.upsun.com/anchors/routes/redirects/affix/", "default": null }, "code": { "type": "integer", "title": "The redirect HTTP status code to use", - "description": "Valid status codes are 301, 302, 307, and 308. \nDefaults to 302 for Partial redirects: \nhttps://docs.upsun.com/define-routes/redirects.html#partial-redirects \nand 301 for Whole-route redirects: \nhttps://docs.upsun.com/define-routes/redirects.html#whole-route-redirects \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#specify-a-http-status-code", + "description": "Valid status codes are 301, 302, 307, and 308. \nDefaults to 302 for Partial redirects: \nhttps://docs.upsun.com/anchors/routes/redirects/affix/ \nand 301 for Whole-route redirects: \nhttps://docs.upsun.com/anchors/routes/redirects/whole/ \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/http-status-code/", "default": 302 }, "expires": { - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "title": "The amount of time, in seconds, to cache the redirects", - "description": "The duration the redirect is cached for. \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#manage-caching", + "description": "The duration the redirect is cached for. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/caching/manage/", "default": null } }, @@ -957,12 +1285,12 @@ "tls": { "type": "object", "title": "TLS settings for the route", - "description": "The absolute URL or other route to which the given route should be redirected with an HTTP 301 status code. \nhttps://docs.upsun.com/define-routes/https.html#optional-configure-tls-connections", + "description": "The absolute URL or other route to which the given route should be redirected with an HTTP 301 status code. \nhttps://docs.upsun.com/anchors/routes/https/tls/", "properties": { "strict_transport_security": { "type": "object", "title": "Strict-Transport-Security options", - "description": "https://docs.upsun.com/define-routes/https.html#optional-configure-tls-connections", + "description": "https://docs.upsun.com/anchors/routes/https/tls/", "properties": { "enabled": { "type": "boolean", @@ -973,7 +1301,7 @@ "include_subdomains": { "type": "boolean", "title": "Whether the strict transport security policy should include all subdomains", - "description": "More information: \nhttps://docs.upsun.com/define-routes/https.html#enable-http-strict-transport-security-hsts", + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/https/tls/hsts/", "default": false }, "preload": { @@ -991,19 +1319,31 @@ } }, "min_version": { - "type": "string", + "type": [ + "string", + "null" + ], "enum": [ - "TLSv1.1", "TLSv1.0", + "TLSv1.1", + "TLSv1.2", "TLSv1.3", - "TLSv1.2" + null ], "title": "The minimum TLS version to support.", "description": "Note that TLS versions older than 1.2 are deprecated and are rejected by default.", "default": null }, "client_authentication": { - "type": "string", + "type": [ + "string", + "null" + ], + "enum": [ + "request", + "require", + null + ], "description": "The type of client authentication to request.", "default": null }, @@ -1013,7 +1353,7 @@ "type": "string" }, "title": "Certificate authorities to validate the client certificate against", - "description": "If not specified, a default set of trusted CAs will be used. \nMore Information: \nhttps://docs.upsun.com/define-routes/https.html#enable-mtls", + "description": "If not specified, a default set of trusted CAs will be used. \nMore Information: \nhttps://docs.upsun.com/anchors/routes/https/tls/mtls/", "default": [] } }, @@ -1032,7 +1372,7 @@ "to": { "type": "string", "title": "Redirect destination", - "description": "The absolute URL or other route to which the given route should be redirected with an HTTP 301 status code. \nA relative URL - '/destination', or absolute URL - 'https://example.com/' \nMore information: \nhttps://docs.upsun.com/define-routes/redirects.html#partial-redirects" + "description": "The absolute URL or other route to which the given route should be redirected with an HTTP 301 status code. \nA relative URL - '/destination', or absolute URL - 'https://example.com/' \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/" }, "cache": { "type": "object", @@ -1091,7 +1431,7 @@ "enabled": { "type": "boolean", "title": "Whether SSI include is enabled", - "description": "More information: \nhttps://docs.upsun.com/define-routes/ssi.html" + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/server-side-includes/" } }, "required": [ @@ -1099,7 +1439,7 @@ ], "additionalProperties": false, "title": "Server-Side Include configuration.", - "description": "More information: \nhttps://docs.upsun.com/define-routes.html#route-configuration-reference", + "description": "More information: \nhttps://docs.upsun.com/anchors/routes/configuration/", "default": { "enabled": false } @@ -1107,7 +1447,7 @@ "upstream": { "type": "string", "title": "The upstream to use for this route", - "description": "The name of the app to be served (as defined in your app configuration) followed by :http. Example: app:http \nMore information: \nhttps://docs.upsun.com/define-routes.html#route-configuration-reference" + "description": "The name of the app to be served (as defined in your app configuration) followed by :http. Example: app:http \nMore information: \nhttps://docs.upsun.com/anchors/routes/configuration/" } }, "relationships": { @@ -1134,7 +1474,7 @@ ] }, "title": "The relationships of the application/service to other services", - "description": "Contains a dictionary of relationships: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#relationships", + "description": "Contains a dictionary of relationships: \nhttps://docs.upsun.com/anchors/app/reference/relationships/", "default": {} }, "firewall": { @@ -1148,7 +1488,7 @@ "protocol": { "type": "string", "title": "The IP protocol to apply the restriction on", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", "default": "tcp" }, "ips": { @@ -1157,7 +1497,7 @@ "type": "string" }, "title": "The IP range in CIDR notation to apply the restriction on", - "description": "See a CIDR format converter: \nhttps://www.ipaddressguide.com/cidr \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers", + "description": "See a CIDR format converter: \nhttps://www.ipaddressguide.com/cidr \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", "default": [] }, "domains": { @@ -1166,7 +1506,7 @@ "type": "string" }, "title": "Domains of the restriction", - "description": "Fully qualified domain names to specify specific destinations by hostname \nhttps://en.wikipedia.org/wiki/Fully_qualified_domain_name \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers", + "description": "Fully qualified domain names to specify specific destinations by hostname \nhttps://en.wikipedia.org/wiki/Fully_qualified_domain_name \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", "default": [] }, "ports": { @@ -1182,14 +1522,14 @@ "additionalProperties": false }, "title": "Outbound firewall restrictions", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#workers", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", "default": [] } }, "additionalProperties": false, "nullable": true, "title": "Outbound firewall rules for the application", - "description": "More information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#firewall", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/firewall/", "default": null }, "mounts": { @@ -1200,9 +1540,10 @@ "source": { "type": "string", "title": "The type of mount that will provide the data", - "description": "- By design, `storage` mounts can be shared between instances of the same app \n- `instance` mounts are local mounts \n- `tmp` (or `temporary`) mounts are local ephemeral mounts \n- `service` mounts can be useful if you want to explicitly define and use a Network Storage service", + "description": "- By design, `storage` mounts can be shared between instances of the same app \n- `instance` (or `local`) mounts are local mounts \n- `tmp` (or `temporary`) mounts are local ephemeral mounts \n- `service` mounts can be useful if you want to explicitly define and use a Network Storage service", "enum": [ "instance", + "local", "service", "storage", "temporary", @@ -1212,12 +1553,12 @@ "source_path": { "type": "string", "title": "The path to be mounted, relative to the root directory of the volume that's being mounted from", - "description": "WARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#ensure-continuity-when-changing-the-name-of-your-mount" + "description": "WARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/anchors/app/reference/mounts/change-name/" }, "service": { "type": "string", "title": "The name of the service that the volume will be mounted from", - "description":" Must be a service in `services.yaml` of type `network-storage`. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#mounts" + "description": " Must be a service in `services.yaml` of type `network-storage`. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/mounts/" } }, "required": [ @@ -1226,7 +1567,7 @@ "additionalProperties": false }, "title": "Filesystem mounts of this application", - "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/create-apps/app-reference/single-runtime-image.html#mounts", + "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/", "default": {} }, "deprecated": { @@ -1257,6 +1598,191 @@ "title": "Resources", "deprecationMessage": "Deprecated" } + }, + "authorizations": { + "type": "array", + "title": "Workload authorizations", + "description": "Grants the container short-lived, narrowly-scoped access to the Upsun API at runtime.\nMore information:\nhttps://developer.upsun.com/docs/configure-apps/image-properties/authorizations", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "env", + "task" + ], + "description": "The type of resource to access: `task` (a task defined in the project) or `env` (the environment API)." + }, + "action": { + "type": "string", + "enum": [ + "operate", + "view" + ], + "description": "`operate` allows triggering and managing a task; `view` grants read-only access to the environment API." + }, + "resource": { + "type": "string", + "description": "The name of the task. Required when `type` is `task`." + } + }, + "required": [ + "type", + "action" + ], + "additionalProperties": false + } + }, + "egress": { + "type": "object", + "title": "Egress proxy allowlists", + "description": "Routes outbound traffic through the egress proxy, allowing only the listed domains, per phase (`build` or `runtime`).", + "properties": { + "build": { + "type": "object", + "properties": { + "allowed_domains": { + "type": "array", + "description": "The domains that outbound traffic may reach.", + "items": { + "type": "object", + "properties": { + "host": { + "type": "string", + "minLength": 1 + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + } + }, + "required": [ + "host" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "runtime": { + "type": "object", + "properties": { + "allowed_domains": { + "type": "array", + "description": "The domains that outbound traffic may reach.", + "items": { + "type": "object", + "properties": { + "host": { + "type": "string", + "minLength": 1 + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + } + }, + "required": [ + "host" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "image": { + "type": "object", + "title": "OCI image configuration", + "description": "For a `docker:` type: either `name` (an image reference) or `buildfile`.", + "properties": { + "name": { + "type": "string" + }, + "buildfile": { + "type": "string" + } + }, + "additionalProperties": false + }, + "stack": { + "type": [ + "object", + "array", + "null" + ], + "title": "Composable image definition", + "description": "The runtimes and packages that make up the composable image. Each is a name, a mapping, or a list of them. A list is only accepted when empty.", + "properties": { + "runtimes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "minProperties": 1, + "maxProperties": 1 + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "minProperties": 1, + "maxProperties": 1 + } + ] + } + } + ] + }, + "packages": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "package" + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "package" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "maxItems": 0 } + }, + "patternProperties": { + "^\\.": {} } } From 6c52363850aca680dd625edba880248bf46aa29c Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 09:17:20 +0100 Subject: [PATCH 2/7] fix(schema): accept docker application types The runtime-versions enum has no docker entries, so applications using a `docker:` type with the `image` key were rejected. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index ff9d102d..26c85b13 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -15,7 +15,7 @@ "$ref": "https://meta.upsun.com/schema/runtime-versions" }, { - "pattern": "^composable:" + "pattern": "^(composable|docker):" } ], "title": "The base runtime (language) and version to use for this application", From 1bcbb993f1e867e5ad4e12696164b2c636a9d940 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 09:36:23 +0100 Subject: [PATCH 3/7] fix(schema): address review findings - Fix the broken docs URL in the hooks.deploy description. - Remove the object default on the string service type. - Check task types against the runtime versions, like application types. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index 26c85b13..9133be70 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -534,7 +534,7 @@ "deploy": { "type": "string", "title": "Hook executed after the deployment of new code", - "description": "More information: \nhttps://docs.upsun.com\t\n/anchors/app/reference/hooks/", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", "default": null }, "post_deploy": { @@ -913,8 +913,7 @@ } ], "title": "The service type", - "description": "One of the available services in the format `type:version`. \nMore information: \nhttps://docs.upsun.com/anchors/services/available/", - "default": {} + "description": "One of the available services in the format `type:version`. \nMore information: \nhttps://docs.upsun.com/anchors/services/available/" }, "size": { "$ref": "#/definitions/deprecated/size" @@ -1127,6 +1126,14 @@ }, "type": { "type": "string", + "anyOf": [ + { + "$ref": "https://meta.upsun.com/schema/runtime-versions" + }, + { + "pattern": "^(composable|docker):" + } + ], "title": "The runtime image and version to use for this task", "description": "The base image to use with a specific app language. \nFormat: runtime:version. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/type/" }, From 5376976033b24e436068a1df433f7f4be38ba046 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 10:11:41 +0100 Subject: [PATCH 4/7] fix(schema): sync per-container overrides and defaults from the CLI Sync with upsun/cli#234: - Accept additional_hosts, firewall and operations under web, and additional_hosts and operations under workers, as overrides of the application's values. Reject egress.build on workers. - Describe override keys as overrides, without defaults. - Remove defaults that fail their own schema. The meta-specific type references and the stack maxItems are kept. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 371 +++++++++++++++----------------- 1 file changed, 176 insertions(+), 195 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index 9133be70..f665e19f 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -30,8 +30,7 @@ "root": { "type": "string", "title": "The root of the application relative to the repository root", - "description": " \nDefaults to the root project directory. \nUseful for multi-app setups: \nhttps://docs.upsun.com/anchors/app/multiple/", - "default": null + "description": " \nDefaults to the root project directory. \nUseful for multi-app setups: \nhttps://docs.upsun.com/anchors/app/multiple/" }, "operations": { "type": "object", @@ -55,11 +54,7 @@ }, "additionalProperties": false, "title": "Information on the app’s source code and operations that can be run on it", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/source/operations/", - "default": { - "operations": {}, - "root": null - } + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/source/operations/" }, "resources": { "$ref": "#/definitions/deprecated/resources" @@ -82,18 +77,20 @@ "additionalProperties": {} }, "title": "Variables provide environment-sensitive information to control how your application behaves", - "description": "To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment." + "description": "Overrides the application's value for this container." }, "timezone": { "type": "string", "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." + "description": "Overrides the application's value for this container." }, "mounts": { - "$ref": "#/definitions/mounts" + "$ref": "#/definitions/mounts", + "description": "Overrides the application's value for this container." }, "relationships": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/relationships", + "description": "Overrides the application's value for this container." }, "access": { "type": "object", @@ -101,13 +98,15 @@ "type": "string" }, "title": "Access information, a mapping between access type and roles", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/access/" + "description": "Overrides the application's value for this container." }, "size": { - "$ref": "#/definitions/deprecated/size" + "$ref": "#/definitions/deprecated/size", + "description": "Overrides the application's value for this container." }, "resources": { - "$ref": "#/definitions/deprecated/resources" + "$ref": "#/definitions/deprecated/resources", + "description": "Overrides the application's value for this container." }, "locations": { "type": "object", @@ -227,7 +226,7 @@ "type": "string", "title": "The maximum size request that can be buffered", "description": "Supports K, M, and G suffixes. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/", - "default": 262144000 + "default": "250m" } }, "additionalProperties": false, @@ -275,8 +274,7 @@ }, "protocol": { "type": "string", - "title": "Protocol", - "default": null + "title": "Protocol" } }, "additionalProperties": false, @@ -332,13 +330,28 @@ "deprecationMessage": "Deprecated" }, "authorizations": { - "$ref": "#/definitions/authorizations" + "$ref": "#/definitions/authorizations", + "description": "Overrides the application's value for this container." }, "egress": { - "$ref": "#/definitions/egress" + "$ref": "#/definitions/egress", + "description": "Overrides the application's value for this container." }, "container_profile": { - "$ref": "#/definitions/container_profile" + "$ref": "#/definitions/container_profile", + "description": "Overrides the application's value for this container." + }, + "additional_hosts": { + "$ref": "#/definitions/additional_hosts", + "description": "Overrides the application's value for this container." + }, + "firewall": { + "$ref": "#/definitions/firewall", + "description": "Overrides the application's value for this container." + }, + "operations": { + "$ref": "#/definitions/operations", + "description": "Overrides the application's value for this container." } }, "additionalProperties": false, @@ -352,7 +365,8 @@ "type": "object", "properties": { "firewall": { - "$ref": "#/definitions/firewall" + "$ref": "#/definitions/firewall", + "description": "Overrides the application's value for this container." }, "variables": { "type": "object", @@ -361,14 +375,12 @@ "additionalProperties": {} }, "title": "Variables to control the environment", - "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/variables/", - "default": {} + "description": "Overrides the application's value for this container." }, "timezone": { "type": "string", "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", - "default": null + "description": "Overrides the application's value for this container." }, "mounts": { "type": "object", @@ -405,11 +417,11 @@ "additionalProperties": false }, "title": "Filesystem mounts of this application", - "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/", - "default": {} + "description": "Overrides the application's value for this container." }, "relationships": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/relationships", + "description": "Overrides the application's value for this container." }, "access": { "type": "object", @@ -417,19 +429,19 @@ "type": "string" }, "title": "Access control for roles accessing app environments", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/access/", - "default": { - "ssh": "contributor" - } + "description": "Overrides the application's value for this container." }, "size": { - "$ref": "#/definitions/deprecated/size" + "$ref": "#/definitions/deprecated/size", + "description": "Overrides the application's value for this container." }, "resources": { - "$ref": "#/definitions/deprecated/resources" + "$ref": "#/definitions/deprecated/resources", + "description": "Overrides the application's value for this container." }, "container_profile": { - "$ref": "#/definitions/container_profile" + "$ref": "#/definitions/container_profile", + "description": "Overrides the application's value for this container." }, "commands": { "type": "object", @@ -458,10 +470,20 @@ "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, "authorizations": { - "$ref": "#/definitions/authorizations" + "$ref": "#/definitions/authorizations", + "description": "Overrides the application's value for this container." }, "egress": { - "$ref": "#/definitions/egress" + "$ref": "#/definitions/worker_egress", + "description": "Overrides the application's value for this container." + }, + "additional_hosts": { + "$ref": "#/definitions/additional_hosts", + "description": "Overrides the application's value for this container." + }, + "operations": { + "$ref": "#/definitions/operations", + "description": "Overrides the application's value for this container." } }, "required": [ @@ -502,16 +524,12 @@ "properties": { "flavor": { "type": "string", - "description": "The pre-set build tasks to use for this application", - "default": null + "description": "The pre-set build tasks to use for this application" } }, "additionalProperties": false, "title": "The build configuration of the application", - "description": "It contains a build dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/build/", - "default": { - "flavor": null - } + "description": "It contains a build dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/build/" }, "dependencies": { "type": "object", @@ -528,20 +546,17 @@ "build": { "type": "string", "title": "Hook executed after the build process", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", - "default": null + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" }, "deploy": { "type": "string", "title": "Hook executed after the deployment of new code", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", - "default": null + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" }, "post_deploy": { "type": "string", "title": "Hook executed after an environment is fully deployed", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", - "default": null + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" } }, "additionalProperties": false, @@ -570,8 +585,7 @@ "stop": { "type": "string", "title": "The command used to stop the cron job", - "description": "The command that’s issued to give the cron command a chance to shutdown gracefully, such as to finish an active item in a list of tasks. Issued when a cron task is interrupted by a user through the CLI or Console. If not specified, a `SIGTERM` signal is sent to the process.", - "default": null + "description": "The command that’s issued to give the cron command a chance to shutdown gracefully, such as to finish an active item in a list of tasks. Issued when a cron task is interrupted by a user through the CLI or Console. If not specified, a `SIGTERM` signal is sent to the process." } }, "required": [ @@ -676,18 +690,12 @@ "$ref": "#/definitions/container_profile" }, "additional_hosts": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Maps of hostnames to IP addresses", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/additional-hosts/" + "$ref": "#/definitions/additional_hosts" }, "timezone": { "type": "string", "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", - "default": null + "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/" }, "preflight": { "type": "object", @@ -717,52 +725,7 @@ } }, "operations": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "commands": { - "type": "object", - "properties": { - "start": { - "type": "string", - "title": "The command used to start the application", - "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." - }, - "stop": { - "type": "string", - "description": "The command used to stop the operation." - } - }, - "required": [ - "start" - ] - }, - "role": { - "type": "string", - "title": "which users can trigger it according to their user role", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/define/", - "enum": [ - "viewer", - "contributor", - "admin" - ] - }, - "timeout": { - "type": "integer", - "minimum": 1, - "maximum": 86400, - "description": "The maximum duration in seconds." - } - }, - "required": [ - "commands" - ], - "additionalProperties": false - }, - "title": "Runtime operations that can be executed in the application container", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/", - "default": {} + "$ref": "#/definitions/operations" }, "authorizations": { "$ref": "#/definitions/authorizations" @@ -1121,8 +1084,7 @@ "timezone": { "type": "string", "title": "The timezone of the application", - "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/", - "default": null + "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/" }, "type": { "type": "string", @@ -1164,7 +1126,6 @@ ], "title": "The container profile for this application/service in production", "description": "Leave blank to allow it to be set dynamically. \nMore information: \nhttps://docs.upsun.com/anchors/resources/manage/configuration/profiles/adjust/", - "default": "", "anyOf": [ { "type": "string", @@ -1190,8 +1151,7 @@ "id": { "type": "string", "title": "Route Identifier", - "description": "A unique identifier for the route. See route identifiers: \nhttps://docs.upsun.com/anchors/routes/identifiers/", - "default": null + "description": "A unique identifier for the route. See route identifiers: \nhttps://docs.upsun.com/anchors/routes/identifiers/" }, "attributes": { "type": "object", @@ -1251,14 +1211,12 @@ "prefix": { "type": "boolean", "title": "Prefix of the redirect path", - "description": "Specifies whether both the path and all its children or just the path itself should be redirected. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/affix/", - "default": null + "description": "Specifies whether both the path and all its children or just the path itself should be redirected. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/affix/" }, "append_suffix": { "type": "boolean", "title": "Suffix of the redirect path", - "description": "Determines if the suffix is carried over with the redirect. More information. \nhttps://docs.upsun.com/anchors/routes/redirects/affix/", - "default": null + "description": "Determines if the suffix is carried over with the redirect. More information. \nhttps://docs.upsun.com/anchors/routes/redirects/affix/" }, "code": { "type": "integer", @@ -1272,8 +1230,7 @@ "string" ], "title": "The amount of time, in seconds, to cache the redirects", - "description": "The duration the redirect is cached for. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/caching/manage/", - "default": null + "description": "The duration the redirect is cached for. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/caching/manage/" } }, "required": [ @@ -1286,8 +1243,7 @@ "required": [ "paths" ], - "additionalProperties": false, - "default": {} + "additionalProperties": false }, "tls": { "type": "object", @@ -1302,8 +1258,7 @@ "enabled": { "type": "boolean", "title": "Whether strict transport security is enabled or not", - "description": "If set to true, HSTS is enabled for 1 year. \nIf set to false, other properties are ignored.", - "default": null + "description": "If set to true, HSTS is enabled for 1 year. \nIf set to false, other properties are ignored." }, "include_subdomains": { "type": "boolean", @@ -1318,12 +1273,7 @@ "default": false } }, - "additionalProperties": false, - "default": { - "preload": null, - "include_subdomains": false, - "enabled": false - } + "additionalProperties": false }, "min_version": { "type": [ @@ -1364,17 +1314,7 @@ "default": [] } }, - "additionalProperties": false, - "default": { - "client_authentication": null, - "min_version": null, - "client_certificate_authorities": [], - "strict_transport_security": { - "preload": null, - "include_subdomains": null, - "enabled": null - } - } + "additionalProperties": false }, "to": { "type": "string", @@ -1481,8 +1421,7 @@ ] }, "title": "The relationships of the application/service to other services", - "description": "Contains a dictionary of relationships: \nhttps://docs.upsun.com/anchors/app/reference/relationships/", - "default": {} + "description": "Contains a dictionary of relationships: \nhttps://docs.upsun.com/anchors/app/reference/relationships/" }, "firewall": { "type": "object", @@ -1536,8 +1475,7 @@ "additionalProperties": false, "nullable": true, "title": "Outbound firewall rules for the application", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/firewall/", - "default": null + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/firewall/" }, "mounts": { "type": "object", @@ -1574,8 +1512,7 @@ "additionalProperties": false }, "title": "Filesystem mounts of this application", - "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/", - "default": {} + "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/" }, "deprecated": { "size": { @@ -1647,60 +1584,10 @@ "description": "Routes outbound traffic through the egress proxy, allowing only the listed domains, per phase (`build` or `runtime`).", "properties": { "build": { - "type": "object", - "properties": { - "allowed_domains": { - "type": "array", - "description": "The domains that outbound traffic may reach.", - "items": { - "type": "object", - "properties": { - "host": { - "type": "string", - "minLength": 1 - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535 - } - }, - "required": [ - "host" - ], - "additionalProperties": false - } - } - }, - "additionalProperties": false + "$ref": "#/definitions/egress_phase" }, "runtime": { - "type": "object", - "properties": { - "allowed_domains": { - "type": "array", - "description": "The domains that outbound traffic may reach.", - "items": { - "type": "object", - "properties": { - "host": { - "type": "string", - "minLength": 1 - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535 - } - }, - "required": [ - "host" - ], - "additionalProperties": false - } - } - }, - "additionalProperties": false + "$ref": "#/definitions/egress_phase" } }, "additionalProperties": false @@ -1787,6 +1674,100 @@ }, "additionalProperties": false, "maxItems": 0 + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Maps of hostnames to IP addresses", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/additional-hosts/" + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the application", + "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." + }, + "stop": { + "type": "string", + "description": "The command used to stop the operation." + } + }, + "required": [ + "start" + ] + }, + "role": { + "type": "string", + "title": "which users can trigger it according to their user role", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/define/", + "enum": [ + "viewer", + "contributor", + "admin" + ] + }, + "timeout": { + "type": "integer", + "minimum": 1, + "maximum": 86400, + "description": "The maximum duration in seconds." + } + }, + "required": [ + "commands" + ], + "additionalProperties": false + }, + "title": "Runtime operations that can be executed in the application container", + "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/" + }, + "egress_phase": { + "type": "object", + "properties": { + "allowed_domains": { + "type": "array", + "description": "The domains that outbound traffic may reach.", + "items": { + "type": "object", + "properties": { + "host": { + "type": "string", + "minLength": 1 + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + } + }, + "required": [ + "host" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "worker_egress": { + "type": "object", + "title": "Egress proxy allowlists", + "description": "Routes outbound traffic through the egress proxy at runtime, allowing only the listed domains. Build-phase egress is set on the application.", + "properties": { + "runtime": { + "$ref": "#/definitions/egress_phase" + } + }, + "additionalProperties": false } }, "patternProperties": { From 733929186bcef824957d56d5a3b6d4ce29ddfb94 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 10:34:28 +0100 Subject: [PATCH 5/7] fix(schema): drop deprecated firewall key, as in the CLI Sync with upsun/cli#234, which removes `firewall` (deprecated in favor of `egress`) from applications, web, workers and services. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 69 --------------------------------- 1 file changed, 69 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index f665e19f..57887181 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -345,10 +345,6 @@ "$ref": "#/definitions/additional_hosts", "description": "Overrides the application's value for this container." }, - "firewall": { - "$ref": "#/definitions/firewall", - "description": "Overrides the application's value for this container." - }, "operations": { "$ref": "#/definitions/operations", "description": "Overrides the application's value for this container." @@ -364,10 +360,6 @@ "additionalProperties": { "type": "object", "properties": { - "firewall": { - "$ref": "#/definitions/firewall", - "description": "Overrides the application's value for this container." - }, "variables": { "type": "object", "additionalProperties": { @@ -516,9 +508,6 @@ "description": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/variables/", "default": {} }, - "firewall": { - "$ref": "#/definitions/firewall" - }, "build": { "type": "object", "properties": { @@ -762,7 +751,6 @@ "workers", "access", "variables", - "firewall", "build", "dependencies", "hooks", @@ -896,9 +884,6 @@ "relationships": { "$ref": "#/definitions/relationships" }, - "firewall": { - "$ref": "#/definitions/firewall" - }, "resources": { "$ref": "#/definitions/deprecated/resources" }, @@ -1423,60 +1408,6 @@ "title": "The relationships of the application/service to other services", "description": "Contains a dictionary of relationships: \nhttps://docs.upsun.com/anchors/app/reference/relationships/" }, - "firewall": { - "type": "object", - "properties": { - "outbound": { - "type": "array", - "items": { - "type": "object", - "properties": { - "protocol": { - "type": "string", - "title": "The IP protocol to apply the restriction on", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", - "default": "tcp" - }, - "ips": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The IP range in CIDR notation to apply the restriction on", - "description": "See a CIDR format converter: \nhttps://www.ipaddressguide.com/cidr \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", - "default": [] - }, - "domains": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Domains of the restriction", - "description": "Fully qualified domain names to specify specific destinations by hostname \nhttps://en.wikipedia.org/wiki/Fully_qualified_domain_name \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", - "default": [] - }, - "ports": { - "type": "array", - "items": { - "type": "integer" - }, - "title": "The port to apply the restriction on", - "description": "Ports from 1 to 65535 that are allowed. If any ports are specified, all unspecified ports are blocked. If no ports are specified, all ports are allowed. Port 25, the SMTP port for sending email, is always blocked.", - "default": [] - } - }, - "additionalProperties": false - }, - "title": "Outbound firewall restrictions", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", - "default": [] - } - }, - "additionalProperties": false, - "nullable": true, - "title": "Outbound firewall rules for the application", - "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/firewall/" - }, "mounts": { "type": "object", "additionalProperties": { From eb61d1901bbaf25563cb2c3e13a32d2148d986fd Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 15:36:52 +0100 Subject: [PATCH 6/7] fix(schema): reject web egress.build and show override descriptions - Build-phase egress is read from the application only, so a `build` allowlist under `web.egress` has no effect. Use the runtime-only egress definition (renamed `container_egress`) for web as well as workers. - Draft-07 ignores keywords beside `$ref`, so the override descriptions were not shown. Move each `$ref` into an `allOf`. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 138 ++++++++++++++++++++++++-------- 1 file changed, 103 insertions(+), 35 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index 57887181..0c025030 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -85,12 +85,20 @@ "description": "Overrides the application's value for this container." }, "mounts": { - "$ref": "#/definitions/mounts", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/mounts" + } + ] }, "relationships": { - "$ref": "#/definitions/relationships", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/relationships" + } + ] }, "access": { "type": "object", @@ -101,12 +109,20 @@ "description": "Overrides the application's value for this container." }, "size": { - "$ref": "#/definitions/deprecated/size", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/deprecated/size" + } + ] }, "resources": { - "$ref": "#/definitions/deprecated/resources", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/deprecated/resources" + } + ] }, "locations": { "type": "object", @@ -330,24 +346,44 @@ "deprecationMessage": "Deprecated" }, "authorizations": { - "$ref": "#/definitions/authorizations", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/authorizations" + } + ] }, "egress": { - "$ref": "#/definitions/egress", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/container_egress" + } + ] }, "container_profile": { - "$ref": "#/definitions/container_profile", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/container_profile" + } + ] }, "additional_hosts": { - "$ref": "#/definitions/additional_hosts", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/additional_hosts" + } + ] }, "operations": { - "$ref": "#/definitions/operations", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/operations" + } + ] } }, "additionalProperties": false, @@ -412,8 +448,12 @@ "description": "Overrides the application's value for this container." }, "relationships": { - "$ref": "#/definitions/relationships", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/relationships" + } + ] }, "access": { "type": "object", @@ -424,16 +464,28 @@ "description": "Overrides the application's value for this container." }, "size": { - "$ref": "#/definitions/deprecated/size", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/deprecated/size" + } + ] }, "resources": { - "$ref": "#/definitions/deprecated/resources", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/deprecated/resources" + } + ] }, "container_profile": { - "$ref": "#/definitions/container_profile", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/container_profile" + } + ] }, "commands": { "type": "object", @@ -462,20 +514,36 @@ "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, "authorizations": { - "$ref": "#/definitions/authorizations", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/authorizations" + } + ] }, "egress": { - "$ref": "#/definitions/worker_egress", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/container_egress" + } + ] }, "additional_hosts": { - "$ref": "#/definitions/additional_hosts", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/additional_hosts" + } + ] }, "operations": { - "$ref": "#/definitions/operations", - "description": "Overrides the application's value for this container." + "description": "Overrides the application's value for this container.", + "allOf": [ + { + "$ref": "#/definitions/operations" + } + ] } }, "required": [ @@ -1689,7 +1757,7 @@ }, "additionalProperties": false }, - "worker_egress": { + "container_egress": { "type": "object", "title": "Egress proxy allowlists", "description": "Routes outbound traffic through the egress proxy at runtime, allowing only the listed domains. Build-phase egress is set on the application.", From a8641cad19f5b794ba42d157314d2bca3b3b8fb4 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 15 Oct 2026 16:01:06 +0100 Subject: [PATCH 7/7] fix(schema): sync Upsun config schema with upsun/cli#242 Copies the CLI's schema, which now accepts configs the platform accepts: - Explicit null on optional fields, where the platform treats it as unset. - Keys starting with "." in mappings with fixed keys and in the applications, services and routes sections (YAML anchors and notes). - An integer `request_buffering.max_request_size`, and `dynamic_compression` on locations and rules. - Files without `applications`, as files in .upsun are merged. - Any container profile name, as profiles are per project. The web `egress.build` rejection and the `allOf` wrapping of `$ref`s are now in the CLI's copy too. The runtime and service version `$ref`s, the `composable:`/`docker:` pattern and the stack `maxItems: 0` are kept. Co-Authored-By: Claude Opus 5.5 --- resources/validation/upsun.json | 719 ++++++++++++++++++++++++++------ 1 file changed, 583 insertions(+), 136 deletions(-) diff --git a/resources/validation/upsun.json b/resources/validation/upsun.json index 0c025030..5474bff6 100644 --- a/resources/validation/upsun.json +++ b/resources/validation/upsun.json @@ -28,7 +28,10 @@ "type": "object", "properties": { "root": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The root of the application relative to the repository root", "description": " \nDefaults to the root project directory. \nUseful for multi-app setups: \nhttps://docs.upsun.com/anchors/app/multiple/" }, @@ -38,7 +41,10 @@ "type": "object", "properties": { "command": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Operations that can be applied to the source code", "description": "More information: \nhttps://docs.upsun.com/anchors/app/source-operations/" } @@ -46,18 +52,31 @@ "required": [ "command" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Operations that can be applied to the source code", "default": {} } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "Information on the app’s source code and operations that can be run on it", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/source/operations/" }, "resources": { - "$ref": "#/definitions/deprecated/resources" + "anyOf": [ + { + "$ref": "#/definitions/deprecated/resources" + }, + { + "type": "null" + } + ] }, "relationships": { "$ref": "#/definitions/relationships" @@ -71,7 +90,10 @@ "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/", "properties": { "variables": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "object", "additionalProperties": {} @@ -80,28 +102,40 @@ "description": "Overrides the application's value for this container." }, "timezone": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The timezone of the application", "description": "Overrides the application's value for this container." }, "mounts": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/mounts" + }, + { + "type": "null" } ] }, "relationships": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/relationships" + }, + { + "type": "null" } ] }, "access": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, @@ -110,17 +144,23 @@ }, "size": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/deprecated/size" + }, + { + "type": "null" } ] }, "resources": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/deprecated/resources" + }, + { + "type": "null" } ] }, @@ -130,7 +170,10 @@ "type": "object", "properties": { "root": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The folder from which to serve static assets for this location relative to the application root", "description": "The directory to serve static assets for this location relative to the app’s root directory. Must be an actual directory inside the root directory. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/source/root/", "default": "public" @@ -147,20 +190,27 @@ "passthru": { "type": [ "string", - "boolean" + "boolean", + "null" ], "title": "Whether to forward disallowed and missing resources from this location to the app", "description": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`.", "default": false }, "scripts": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether to allow scripts to run", "description": "Doesn't apply to paths specified in `passthru`. Meaningful only on PHP containers.", "default": true }, "index": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, @@ -189,7 +239,8 @@ "expires": { "type": [ "integer", - "string" + "string", + "null" ], "title": "Amount of time to cache static assets", "description": "How long static assets are cached. The default means no caching. Setting it to a value enables the `Cache-Control` and `Expires` headers. Times can be suffixed with `ms` = milliseconds, `s` = seconds, `m` = minutes, `h` = hours, `d` = days, `w` = weeks, `M` = months/30d, or `y` = years/365d. If a `Cache-Control` appears on the `headers` configuration, `expires`, if set, will be ignored. Thus, make sure to set the `Cache-Control`’s `max-age` value when specifying a the header.", @@ -198,20 +249,27 @@ "passthru": { "type": [ "string", - "boolean" + "boolean", + "null" ], "title": "Whether to forward disallowed and missing resources from this location to the app", "description": "On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`.", "default": true }, "scripts": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether to allow scripts to run", "description": "Doesn't apply to paths specified in `passthru`. Meaningful only on PHP containers.", "default": true }, "allow": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether to allow serving files which don’t match a rule", "default": true }, @@ -222,9 +280,20 @@ }, "title": "A set of header fields set to the HTTP response", "description": "Any additional headers to apply to static assets, mapping header names to values. Responses from the app aren’t affected. \nSee how to set custom headers on static content: \nhttps://docs.upsun.com/anchors/app/web/custom-headers/" + }, + "dynamic_compression": { + "type": [ + "boolean", + "null" + ], + "title": "Whether to compress dynamic responses", + "description": "Compresses dynamic responses (gzip/brotli) at the container web server. Disabled by default; only enable when the application framework mitigates BREACH (e.g. CSRF-token masking)." } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Specific overrides for specific locations", "description": "Contains a rules dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/locations/rules/", @@ -239,18 +308,36 @@ "default": true }, "max_request_size": { - "type": "string", + "type": [ + "string", + "integer", + "null" + ], "title": "The maximum size request that can be buffered", - "description": "Supports K, M, and G suffixes. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/", + "description": "A size in bytes, or with a K, M or G suffix. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/", "default": "250m" } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "Configuration for supporting request buffering.", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/request-buffering/" + }, + "dynamic_compression": { + "type": [ + "boolean", + "null" + ], + "title": "Whether to compress dynamic responses", + "description": "Compresses dynamic responses (gzip/brotli) at the container web server. Disabled by default; only enable when the application framework mitigates BREACH (e.g. CSRF-token masking)." } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "The specification of the web locations served by this application", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/", @@ -260,22 +347,34 @@ "type": "object", "properties": { "pre_start": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Command run just prior to `start`", "description": "Which can be useful when you need to run per-instance actions." }, "start": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The command used to start the application", "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP or FrankenPHP. \nSee note: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/start/" }, "post_start": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "A command executed after the application is started", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/" } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "The command to launch your app", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/commands/" }, @@ -289,11 +388,17 @@ "default": "tcp" }, "protocol": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Protocol" } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "Configuration on how the web server communicates with the application", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/web/upstream/" }, @@ -347,17 +452,23 @@ }, "authorizations": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/authorizations" + }, + { + "type": "null" } ] }, "egress": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/container_egress" + }, + { + "type": "null" } ] }, @@ -371,22 +482,31 @@ }, "additional_hosts": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/additional_hosts" + }, + { + "type": "null" } ] }, "operations": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/operations" + }, + { + "type": "null" } ] } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "default": { "locations": {} } @@ -397,7 +517,10 @@ "type": "object", "properties": { "variables": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "object", "additionalProperties": {} @@ -406,12 +529,18 @@ "description": "Overrides the application's value for this container." }, "timezone": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The timezone of the application", "description": "Overrides the application's value for this container." }, "mounts": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "object", "properties": { @@ -434,7 +563,10 @@ "description": "Path relative to the root directory of the volume that's being mounted from. \nWARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/anchors/app/reference/mounts/change-name/" }, "service": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The name of the service that the volume will be mounted from", "description": "Must be a service in `services.yaml` of type `network-storage`." } @@ -442,21 +574,30 @@ "required": [ "source" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Filesystem mounts of this application", "description": "Overrides the application's value for this container." }, "relationships": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/relationships" + }, + { + "type": "null" } ] }, "access": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, @@ -465,17 +606,23 @@ }, "size": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/deprecated/size" + }, + { + "type": "null" } ] }, "resources": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/deprecated/resources" + }, + { + "type": "null" } ] }, @@ -491,7 +638,10 @@ "type": "object", "properties": { "pre_start": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The command used to run before starting the application", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, @@ -501,7 +651,10 @@ "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, "post_start": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "A command executed after the application is started", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" } @@ -510,38 +663,53 @@ "start" ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "The commands to manage the worker", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/" }, "authorizations": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/authorizations" + }, + { + "type": "null" } ] }, "egress": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/container_egress" + }, + { + "type": "null" } ] }, "additional_hosts": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/additional_hosts" + }, + { + "type": "null" } ] }, "operations": { "description": "Overrides the application's value for this container.", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/operations" + }, + { + "type": "null" } ] } @@ -549,7 +717,10 @@ "required": [ "commands" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Alternate copies of the application to run as background processes", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/workers/", @@ -580,11 +751,17 @@ "type": "object", "properties": { "flavor": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The pre-set build tasks to use for this application" } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "The build configuration of the application", "description": "It contains a build dictionary. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/build/" }, @@ -601,22 +778,34 @@ "type": "object", "properties": { "build": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Hook executed after the build process", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" }, "deploy": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Hook executed after the deployment of new code", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" }, "post_deploy": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Hook executed after an environment is fully deployed", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/" } }, "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "What commands run at different stages in the `build`, `deploy` and `post_deploy` process", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/hooks/", "default": {} @@ -640,7 +829,10 @@ "description": "By default, the command is run in Dash (till you specify something else): \nhttps://en.wikipedia.org/wiki/Almquist_shell" }, "stop": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The command used to stop the cron job", "description": "The command that’s issued to give the cron command a chance to shutdown gracefully, such as to finish an active item in a list of tasks. Issued when a cron task is interrupted by a user through the CLI or Console. If not specified, a `SIGTERM` signal is sent to the process." } @@ -649,11 +841,17 @@ "start" ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "A definition of what commands to run when starting and stopping the cron job", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/crons/commands/" }, "shutdown_timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "The timeout in seconds after which the cron job will be forcefully killed", "description": "When a cron is canceled, this represents the number of seconds after which a `SIGKILL` signal is sent to the process to force terminate it. The default is `10` seconds.", "default": 10 @@ -674,7 +872,10 @@ "required": [ "spec" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Scheduled cron tasks executed by this application", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/crons/", @@ -686,57 +887,87 @@ "description": "Customizations to your PHP or Lisp runtime. \nContains a runtime dictionary: \nhttps://docs.upsun.com/anchors/app/reference/runtime/", "properties": { "extensions": { - "type": "array", + "type": [ + "array", + "null" + ], "title": "PHP extensions to enable", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", "default": [] }, "disabled_extensions": { - "type": "array", + "type": [ + "array", + "null" + ], "title": "PHP extensions to disable", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", "default": [] }, "request_terminate_timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "PHP timeout to terminate requests", "description": "The timeout in seconds for serving a single request after which the PHP-FPM worker process is killed." }, "sizing_hints": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "A sizing hints definition", "description": "The assumptions for setting the number of workers in your PHP-FPM runtime. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/runtime/sizing-hints/", "properties": { "request_memory": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "The average memory consumed per request in MB", "description": "Minimum to 10", "default": 45, "minimum": 10 }, "reserved_memory": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "The amount of memory reserved in MB", "description": "Minimum to 70", "default": 70, "minimum": 70 } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "xdebug": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "An Xdebug definition", "description": "The setting to turn on Xdebug. \nMore information: \nhttps://docs.upsun.com/anchors/languages/php/xdebug/", "properties": { "idekey": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Your Xdebug key" } } }, "quicklisp": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "Distributions for QuickLisp to use", "description": "More information: \nhttps://docs.upsun.com/anchors/languages/lisp/", "deprecationMessage": "Lisp image no longer exists, please see \nhttps://devcenter.upsun.com/posts/deploying-with-lisp/ \n for more information" @@ -750,7 +981,10 @@ "$ref": "#/definitions/additional_hosts" }, "timezone": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The timezone of the application", "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/" }, @@ -775,6 +1009,9 @@ "enabled" ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "description": "Configuration for pre-flight checks", "default": { "enabled": true, @@ -788,7 +1025,14 @@ "$ref": "#/definitions/authorizations" }, "egress": { - "$ref": "#/definitions/egress" + "anyOf": [ + { + "$ref": "#/definitions/egress" + }, + { + "type": "null" + } + ] }, "image": { "$ref": "#/definitions/image" @@ -808,6 +1052,9 @@ } ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "x-order": [ "type", "stack", @@ -830,6 +1077,9 @@ "preflight", "operations" ] + }, + "patternProperties": { + "^\\.": {} } }, "routes": { @@ -847,10 +1097,24 @@ "description": "More information: \nhttps://docs.upsun.com/anchors/routes/identifiers/", "properties": { "primary": { - "$ref": "#/definitions/routes/primary" + "anyOf": [ + { + "$ref": "#/definitions/routes/primary" + }, + { + "type": "null" + } + ] }, "id": { - "$ref": "#/definitions/routes/id" + "anyOf": [ + { + "$ref": "#/definitions/routes/id" + }, + { + "type": "null" + } + ] }, "attributes": { "$ref": "#/definitions/routes/attributes" @@ -872,16 +1136,33 @@ "type", "to" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, { "type": "object", "properties": { "primary": { - "$ref": "#/definitions/routes/primary" + "anyOf": [ + { + "$ref": "#/definitions/routes/primary" + }, + { + "type": "null" + } + ] }, "id": { - "$ref": "#/definitions/routes/id" + "anyOf": [ + { + "$ref": "#/definitions/routes/id" + }, + { + "type": "null" + } + ] }, "attributes": { "$ref": "#/definitions/routes/attributes" @@ -909,9 +1190,15 @@ "type", "upstream" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } ] + }, + "patternProperties": { + "^\\.": {} } }, "services": { @@ -953,7 +1240,14 @@ "$ref": "#/definitions/relationships" }, "resources": { - "$ref": "#/definitions/deprecated/resources" + "anyOf": [ + { + "$ref": "#/definitions/deprecated/resources" + }, + { + "type": "null" + } + ] }, "container_profile": { "$ref": "#/definitions/container_profile" @@ -962,7 +1256,13 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } + }, + "patternProperties": { + "^\\.": {} } }, "tasks": { @@ -1004,7 +1304,14 @@ "default": {} }, "egress": { - "$ref": "#/definitions/egress" + "anyOf": [ + { + "$ref": "#/definitions/egress" + }, + { + "type": "null" + } + ] }, "hooks": { "type": "object", @@ -1024,7 +1331,10 @@ "description": "Run before the task's run command." } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "image": { "$ref": "#/definitions/image" @@ -1036,7 +1346,14 @@ "$ref": "#/definitions/relationships" }, "resources": { - "$ref": "#/definitions/deprecated/resources" + "anyOf": [ + { + "$ref": "#/definitions/deprecated/resources" + }, + { + "type": "null" + } + ] }, "run": { "type": "object", @@ -1056,7 +1373,10 @@ "required": [ "command" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "runtime": { "type": "object", @@ -1064,57 +1384,87 @@ "description": "Customizations to your PHP or Lisp runtime. \nContains a runtime dictionary: \nhttps://docs.upsun.com/anchors/app/reference/runtime/", "properties": { "extensions": { - "type": "array", + "type": [ + "array", + "null" + ], "title": "PHP extensions to enable", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", "default": [] }, "disabled_extensions": { - "type": "array", + "type": [ + "array", + "null" + ], "title": "PHP extensions to disable", "description": "More information: \nhttps://docs.upsun.com/anchors/app/reference/extensions/", "default": [] }, "request_terminate_timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "PHP timeout to terminate requests", "description": "The timeout in seconds for serving a single request after which the PHP-FPM worker process is killed." }, "sizing_hints": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "A sizing hints definition", "description": "The assumptions for setting the number of workers in your PHP-FPM runtime. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/runtime/sizing-hints/", "properties": { "request_memory": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "The average memory consumed per request in MB", "description": "Minimum to 10", "default": 45, "minimum": 10 }, "reserved_memory": { - "type": "integer", + "type": [ + "integer", + "null" + ], "title": "The amount of memory reserved in MB", "description": "Minimum to 70", "default": 70, "minimum": 70 } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "xdebug": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "An Xdebug definition", "description": "The setting to turn on Xdebug. \nMore information: \nhttps://docs.upsun.com/anchors/languages/php/xdebug/", "properties": { "idekey": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "Your Xdebug key" } } }, "quicklisp": { - "type": "object", + "type": [ + "object", + "null" + ], "title": "Distributions for QuickLisp to use", "description": "More information: \nhttps://docs.upsun.com/anchors/languages/lisp/", "deprecationMessage": "Lisp image no longer exists, please see \nhttps://devcenter.upsun.com/posts/deploying-with-lisp/ \n for more information" @@ -1129,13 +1479,19 @@ "description": "The subdirectory containing the task's code. Defaults to `/`." } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "stack": { "$ref": "#/definitions/stack" }, "timezone": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The timezone of the application", "description": "This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified. \nSee also: \nhttps://docs.upsun.com/anchors/app/timezone/" }, @@ -1163,13 +1519,13 @@ "default": {} } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } } }, - "required": [ - "applications" - ], "additionalProperties": false, "definitions": { "container_profile": { @@ -1178,20 +1534,12 @@ "null" ], "title": "The container profile for this application/service in production", - "description": "Leave blank to allow it to be set dynamically. \nMore information: \nhttps://docs.upsun.com/anchors/resources/manage/configuration/profiles/adjust/", - "anyOf": [ - { - "type": "string", - "enum": [ - "HIGH_CPU", - "BALANCED", - "HIGH_MEMORY", - "HIGHER_MEMORY" - ] - }, - { - "type": "null" - } + "description": "A profile defined in the project. Leave blank to allow it to be set dynamically. \nMore information: \nhttps://docs.upsun.com/anchors/resources/manage/configuration/profiles/adjust/", + "examples": [ + "BALANCED", + "HIGH_CPU", + "HIGH_MEMORY", + "HIGHER_MEMORY" ] }, "routes": { @@ -1262,12 +1610,18 @@ "description": "A relative URL - '/destination', \nor absolute URL - 'https://example.com/'. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/partial/" }, "prefix": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Prefix of the redirect path", "description": "Specifies whether both the path and all its children or just the path itself should be redirected. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/affix/" }, "append_suffix": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Suffix of the redirect path", "description": "Determines if the suffix is carried over with the redirect. More information. \nhttps://docs.upsun.com/anchors/routes/redirects/affix/" }, @@ -1280,7 +1634,8 @@ "expires": { "type": [ "integer", - "string" + "string", + "null" ], "title": "The amount of time, in seconds, to cache the redirects", "description": "The duration the redirect is cached for. \nMore information: \nhttps://docs.upsun.com/anchors/routes/redirects/caching/manage/" @@ -1289,14 +1644,20 @@ "required": [ "to" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } } }, "required": [ "paths" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "tls": { "type": "object", @@ -1309,24 +1670,36 @@ "description": "https://docs.upsun.com/anchors/routes/https/tls/", "properties": { "enabled": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether strict transport security is enabled or not", "description": "If set to true, HSTS is enabled for 1 year. \nIf set to false, other properties are ignored." }, "include_subdomains": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether the strict transport security policy should include all subdomains", "description": "More information: \nhttps://docs.upsun.com/anchors/routes/https/tls/hsts/", "default": false }, "preload": { - "type": "boolean", + "type": [ + "boolean", + "null" + ], "title": "Whether the strict transport security policy should be preloaded in browsers", "description": "To add your website to the HSTS preload list: \nhttps://hstspreload.org/. \nThanks to this list, most browsers are informed that your site requires HSTS before an HSTS header response is even issued.\n", "default": false } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "min_version": { "type": [ @@ -1367,7 +1740,10 @@ "default": [] } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "to": { "type": "string", @@ -1412,6 +1788,9 @@ "enabled" ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "Cache configuration", "default": { "default_ttl": 0, @@ -1438,6 +1817,9 @@ "enabled" ], "additionalProperties": false, + "patternProperties": { + "^\\.": {} + }, "title": "Server-Side Include configuration.", "description": "More information: \nhttps://docs.upsun.com/anchors/routes/configuration/", "default": { @@ -1467,7 +1849,10 @@ "type": "string" }, "endpoint": { - "type": "string" + "type": [ + "string", + "null" + ] } } } @@ -1500,7 +1885,10 @@ "description": "WARNING: Changing the name of your mount affects the source_path when it’s undefined. See how to ensure continuity and maintain access to your files \nhttps://docs.upsun.com/anchors/app/reference/mounts/change-name/" }, "service": { - "type": "string", + "type": [ + "string", + "null" + ], "title": "The name of the service that the volume will be mounted from", "description": " Must be a service in `services.yaml` of type `network-storage`. \nMore information: \nhttps://docs.upsun.com/anchors/app/reference/mounts/" } @@ -1508,7 +1896,10 @@ "required": [ "source" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Filesystem mounts of this application", "description": "Directories that are writable even after the app is built. Allocated disk for mounts is defined with a separate resource configuration call using `upsun resources:set`. \nContains a dictionary of mounts: \nhttps://docs.upsun.com/anchors/app/reference/mounts/" @@ -1537,7 +1928,9 @@ } }, "additionalProperties": false, - "nullable": true, + "patternProperties": { + "^\\.": {} + }, "title": "Resources", "deprecationMessage": "Deprecated" } @@ -1574,7 +1967,10 @@ "type", "action" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } }, "egress": { @@ -1583,13 +1979,30 @@ "description": "Routes outbound traffic through the egress proxy, allowing only the listed domains, per phase (`build` or `runtime`).", "properties": { "build": { - "$ref": "#/definitions/egress_phase" + "anyOf": [ + { + "$ref": "#/definitions/egress_phase" + }, + { + "type": "null" + } + ] }, "runtime": { - "$ref": "#/definitions/egress_phase" + "anyOf": [ + { + "$ref": "#/definitions/egress_phase" + }, + { + "type": "null" + } + ] } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "image": { "type": "object", @@ -1600,10 +2013,16 @@ "type": "string" }, "buildfile": { - "type": "string" + "type": [ + "string", + "null" + ] } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "stack": { "type": [ @@ -1696,7 +2115,10 @@ "description": "It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." }, "stop": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The command used to stop the operation." } }, @@ -1715,7 +2137,10 @@ ] }, "timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "minimum": 1, "maximum": 86400, "description": "The maximum duration in seconds." @@ -1724,7 +2149,10 @@ "required": [ "commands" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "title": "Runtime operations that can be executed in the application container", "description": "More information: \nhttps://docs.upsun.com/anchors/app/runtime-operations/" @@ -1743,7 +2171,10 @@ "minLength": 1 }, "port": { - "type": "integer", + "type": [ + "integer", + "null" + ], "minimum": 1, "maximum": 65535 } @@ -1751,11 +2182,17 @@ "required": [ "host" ], - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } }, "container_egress": { "type": "object", @@ -1763,10 +2200,20 @@ "description": "Routes outbound traffic through the egress proxy at runtime, allowing only the listed domains. Build-phase egress is set on the application.", "properties": { "runtime": { - "$ref": "#/definitions/egress_phase" + "anyOf": [ + { + "$ref": "#/definitions/egress_phase" + }, + { + "type": "null" + } + ] } }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^\\.": {} + } } }, "patternProperties": {