As an alternative to configuring your app in the control panel, you can define an app specification using YAML. YAML-based app specs are useful for deploying fully-configured apps with the DigitalOcean API or using doctl
, the DigitalOcean command-line tool.
This is a clickable list of the annotations in the YAML file, presented in the nested hierarchy that the YAML file uses.
String. The name of the app. Must be unique across all apps in the same account.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
String. The name. Must be unique across all components within the same app.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
git
, github
, gitlab
, or image
must be set.https://github.com/digitalocean/sample-golang.git
git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo. Example: digitalocean/sample-golang
Must comply with the following regular expression: ^[^/]+/[^/]+$
git
, github
, gitlab
, or image
must be set.String. The registry type.
DOCR
: The DigitalOcean container registry type.DOCKER_HUB
: The DockerHub container registry type.DOCR
registry type. Required for the DOCKER_HUB
registry type.latest
if not provided.git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo or owner/subgroup/repo. Example: digitalocean/sample-golang
or digitalocean/subgroup/sample-golang
Must comply with the following regular expression: ^[^/]+(/[^/]+)+$
String. The name
Must comply with the following regular expression: ^[_A-Za-z][_A-Za-z0-9]*$
SECRET
, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.String. The visibility scope
RUN_TIME
: Made available only at run-timeBUILD_TIME
: Made available only at build-timeRUN_AND_BUILD_TIME
: Made available at both build and run-timeString. The type
GENERAL
: A plain-text environment variableSECRET
: A secret encrypted environment variablebasic-xxs
PORT
, one will be automatically added with its value set to the value of this field.path=/api
will have requests to /api/list
trimmed to /list
. If this value is true
, the path will remain /api/list
.String. Exact string match. Only 1 of exact
, prefix
, or regex
must be set.
Minimum length: 1. Maximum length: 256
String. Prefix-based match. Only 1 of exact
, prefix
, or regex
must be set.
Minimum length: 1. Maximum length: 256
String. RE2 style regex-based match. Only 1 of exact
, prefix
, or regex
must be set. For more information about RE2 syntax, see: https://github.com/google/re2/wiki/Syntax
Minimum length: 1. Maximum length: 256
5h30m
.include
. This configures the Access-Control-Allow-Credentials header.String. The specific type of alert.
CPU_UTILIZATION
: Represents CPU for a given container instance. Only applicable at the component level.MEM_UTILIZATION
: Represents RAM for a given container instance. Only applicable at the component level.RESTART_COUNT
: Represents restart count for a given container instance. Only applicable at the component level.DEPLOYMENT_FAILED
: Represents whether a deployment has failed. Only applicable at the app level.DEPLOYMENT_LIVE
: Represents whether a deployment has succeeded. Only applicable at the app level.DOMAIN_FAILED
: Represents whether a domain configuration has failed. Only applicable at the app level.DOMAIN_LIVE
: Represents whether a domain configuration has succeeded. Only applicable at the app level.GREATER_THAN
, or LESS_THAN
FIVE_MINUTES
, TEN_MINUTES
, THIRTY_MINUTES
, or ONE_HOUR
String. Name of the log destination.
Minimum length: 2. Maximum length: 42.
Must comply with the following regular expression: ^[A-Za-z0-9()\[\]'"][-A-Za-z0-9_. \/()\[\]]{0,40}[A-Za-z0-9()\[\]'"]$
String. The name. Must be unique across all components within the same app.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
git
, github
, or gitlab
must be set.https://github.com/digitalocean/sample-golang.git
git
, github
, or gitlab
must be set.String. The name of the repo in the format owner/repo. Example: digitalocean/sample-golang
Must comply with the following regular expression: ^[^/]+/[^/]+$
git
, github
, or gitlab
must be set.String. The name of the repo in the format owner/repo or owner/subgroup/repo. Example: digitalocean/sample-golang
or digitalocean/subgroup/sample-golang
Must comply with the following regular expression: ^[^/]+(/[^/]+)+$
_static
, dist
, public
, build
.String. The name
Must comply with the following regular expression: ^[_A-Za-z][_A-Za-z0-9]*$
SECRET
, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.String. The visibility scope
RUN_TIME
: Made available only at run-timeBUILD_TIME
: Made available only at build-timeRUN_AND_BUILD_TIME
: Made available at both build and run-timeString. The type
GENERAL
: A plain-text environment variableSECRET
: A secret encrypted environment variablepath=/api
will have requests to /api/list
trimmed to /list
. If this value is true
, the path will remain /api/list
.String. Exact string match. Only 1 of exact
, prefix
, or regex
must be set.
Minimum length: 1. Maximum length: 256
String. Prefix-based match. Only 1 of exact
, prefix
, or regex
must be set.
Minimum length: 1. Maximum length: 256
String. RE2 style regex-based match. Only 1 of exact
, prefix
, or regex
must be set. For more information about RE2 syntax, see: https://github.com/google/re2/wiki/Syntax
Minimum length: 1. Maximum length: 256
5h30m
.include
. This configures the Access-Control-Allow-Credentials header.catchall_document
or error_document
can be set.String. The name. Must be unique across all components within the same app.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
git
, github
, gitlab
, or image
must be set.https://github.com/digitalocean/sample-golang.git
git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo. Example: digitalocean/sample-golang
Must comply with the following regular expression: ^[^/]+/[^/]+$
git
, github
, gitlab
, or image
must be set.String. The registry type.
DOCR
: The DigitalOcean container registry type.DOCKER_HUB
: The DockerHub container registry type.DOCR
registry type. Required for the DOCKER_HUB
registry type.latest
if not provided.git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo or owner/subgroup/repo. Example: digitalocean/sample-golang
or digitalocean/subgroup/sample-golang
Must comply with the following regular expression: ^[^/]+(/[^/]+)+$
String. The name
Must comply with the following regular expression: ^[_A-Za-z][_A-Za-z0-9]*$
SECRET
, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.String. The visibility scope
RUN_TIME
: Made available only at run-timeBUILD_TIME
: Made available only at build-timeRUN_AND_BUILD_TIME
: Made available at both build and run-timeString. The type
GENERAL
: A plain-text environment variableSECRET
: A secret encrypted environment variableString. The specific type of alert.
CPU_UTILIZATION
: Represents CPU for a given container instance. Only applicable at the component level.MEM_UTILIZATION
: Represents RAM for a given container instance. Only applicable at the component level.RESTART_COUNT
: Represents restart count for a given container instance. Only applicable at the component level.DEPLOYMENT_FAILED
: Represents whether a deployment has failed. Only applicable at the app level.DEPLOYMENT_LIVE
: Represents whether a deployment has succeeded. Only applicable at the app level.DOMAIN_FAILED
: Represents whether a domain configuration has failed. Only applicable at the app level.DOMAIN_LIVE
: Represents whether a domain configuration has succeeded. Only applicable at the app level.GREATER_THAN
, or LESS_THAN
FIVE_MINUTES
, TEN_MINUTES
, THIRTY_MINUTES
, or ONE_HOUR
String. Name of the log destination.
Minimum length: 2. Maximum length: 42.
Must comply with the following regular expression: ^[A-Za-z0-9()\[\]'"][-A-Za-z0-9_. \/()\[\]]{0,40}[A-Za-z0-9()\[\]'"]$
String. The name. Must be unique across all components within the same app.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
git
, github
, gitlab
, or image
must be set.https://github.com/digitalocean/sample-golang.git
git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo. Example: digitalocean/sample-golang
Must comply with the following regular expression: ^[^/]+/[^/]+$
git
, github
, gitlab
, or image
must be set.String. The registry type.
DOCR
: The DigitalOcean container registry type.DOCKER_HUB
: The DockerHub container registry type.DOCR
registry type. Required for the DOCKER_HUB
registry type.latest
if not provided.git
, github
, gitlab
, or image
must be set.String. The name of the repo in the format owner/repo or owner/subgroup/repo. Example: digitalocean/sample-golang
or digitalocean/subgroup/sample-golang
Must comply with the following regular expression: ^[^/]+(/[^/]+)+$
String. The name
Must comply with the following regular expression: ^[_A-Za-z][_A-Za-z0-9]*$
SECRET
, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.String. The visibility scope
RUN_TIME
: Made available only at run-timeBUILD_TIME
: Made available only at build-timeRUN_AND_BUILD_TIME
: Made available at both build and run-timeString. The type
GENERAL
: A plain-text environment variableSECRET
: A secret encrypted environment variableString. The type of job and when it will be run during the deployment process.
UNSPECIFIED
: Default job type, will auto-complete to POST_DEPLOY kind.PRE_DEPLOY
: Indicates a job that runs before an app deployment.POST_DEPLOY
: Indicates a job that runs after an app deployment.FAILED_DEPLOY
: Indicates a job that runs after a component fails to deploy.String. The specific type of alert.
CPU_UTILIZATION
: Represents CPU for a given container instance. Only applicable at the component level.MEM_UTILIZATION
: Represents RAM for a given container instance. Only applicable at the component level.RESTART_COUNT
: Represents restart count for a given container instance. Only applicable at the component level.DEPLOYMENT_FAILED
: Represents whether a deployment has failed. Only applicable at the app level.DEPLOYMENT_LIVE
: Represents whether a deployment has succeeded. Only applicable at the app level.DOMAIN_FAILED
: Represents whether a domain configuration has failed. Only applicable at the app level.DOMAIN_LIVE
: Represents whether a domain configuration has succeeded. Only applicable at the app level.GREATER_THAN
, or LESS_THAN
FIVE_MINUTES
, TEN_MINUTES
, THIRTY_MINUTES
, or ONE_HOUR
String. Name of the log destination.
Minimum length: 2. Maximum length: 42.
Must comply with the following regular expression: ^[A-Za-z0-9()\[\]'"][-A-Za-z0-9_. \/()\[\]]{0,40}[A-Za-z0-9()\[\]'"]$
String. The name. Must be unique across all components within the same app.
Minimum length: 2. Maximum length: 32.
Must comply with the following regular expression: ^[a-z][a-z0-9-]{0,30}[a-z0-9]$
String. The database engine to use
MYSQL
: MySQLPG
: PostgreSQLREDIS
: RedisString. The hostname for the domain
Minimum length: 4. Maximum length: 253.
Must comply with the following regular expression: ^([a-zA-Z0-9]+(-+[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,}\.?$
String. The domain type, which can be one of the following:
DEFAULT
: The default .ondigitalocean.app
domain assigned to this appPRIMARY
: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app’s live URL. Only one domain may be set as primary.ALIAS
: A non-primary domainString. Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account.
For example, If the domain you are adding is app.domain.com
, the zone could be domain.com
.
String. Optional. The minimum version of TLS a client application can use to access resources for the domain. Defaults to "1.2"
if not provided.
Must be one of the following values wrapped within quotations: "1.2"
or "1.3"
.
nearest available
String. The name
Must comply with the following regular expression: ^[_A-Za-z][_A-Za-z0-9]*$
SECRET
, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.String. The visibility scope
RUN_TIME
: Made available only at run-timeBUILD_TIME
: Made available only at build-timeRUN_AND_BUILD_TIME
: Made available at both build and run-timeString. The type
GENERAL
: A plain-text environment variableSECRET
: A secret encrypted environment variableString. The specific type of alert.
CPU_UTILIZATION
: Represents CPU for a given container instance. Only applicable at the component level.MEM_UTILIZATION
: Represents RAM for a given container instance. Only applicable at the component level.RESTART_COUNT
: Represents restart count for a given container instance. Only applicable at the component level.DEPLOYMENT_FAILED
: Represents whether a deployment has failed. Only applicable at the app level.DEPLOYMENT_LIVE
: Represents whether a deployment has succeeded. Only applicable at the app level.DOMAIN_FAILED
: Represents whether a domain configuration has failed. Only applicable at the app level.DOMAIN_LIVE
: Represents whether a domain configuration has succeeded. Only applicable at the app level.GREATER_THAN
, or LESS_THAN
FIVE_MINUTES
, TEN_MINUTES
, THIRTY_MINUTES
, or ONE_HOUR