Browse Source

Update schema docs (#458)

pull/465/head
Justin Kotalik 6 years ago
parent
commit
b2968cdca1
  1. 41
      docs/reference/schema.md
  2. 130
      src/schema/tye-schema.json

41
docs/reference/schema.md

@ -146,13 +146,21 @@ Including a `project` entry marks the service as a *project*:
#### `image` (string)
The name and optional tag of an image that can be run using Docker.
The name and optional tag of an image that can be run using Docker.
Including `image` marks the service as a *container*:
- It will pulled and run locally using Docker during development.
- It will not be deployed during deployment.
#### `dockerFile` (string)
The Dockerfile to build from. Uses the name of the service as the name of the image. Only supported for `tye run` currently.
#### `dockerFileContext` (string)
Path to the Dockerfile Context to run docker build against. This is only used when `dockerFile` is specified as well.
#### `executable` (string)
The path (or filename) of an executable to launch.
@ -231,6 +239,37 @@ The name of the environment variable.
The value of the environment variable.
## Build Properties
Configuration that can be specified when building a project. These will be passed in as MSBuild properties when building a project. It appears in the list `buildProperties` of a `Service`.
### Build Properties Example
```yaml
name: frontend-backend
services:
- name: backend
project: backend/backend.csproj
buildProperties:
- name: Configuration
value: Debug
- name: frontend
project: frontend/frontend.csproj
buildProperties:
- name: Configuration
value: Release
```
### Build Properties Definition
#### `name` (string) *required*
The name of the build property.
#### `value` (string) *required*
The value of the build property.
## Binding
`Binding` elements appear in a list inside the `bindings` property of a `Service`.

130
src/schema/tye-schema.json

@ -29,6 +29,13 @@
"$ref": "#/definitions/ingress"
}
},
"extensions": {
"description": "Extensions to be added to tye.",
"type": "array",
"items": {
"$ref": "#/definitions/extension"
}
},
"services": {
"description": "The application's services.",
"type": "array",
@ -47,6 +54,12 @@
},
{
"$ref": "#/definitions/project"
},
{
"$ref": "#/definitions/repository"
},
{
"$ref": "#/definitions/include"
}
]
}
@ -109,6 +122,45 @@
],
"additionalProperties": false
},
"build-property": {
"type": "object",
"properties": {
"name": {
"description": "Build property name.",
"type": "string"
},
"value": {
"description": "Build property name.",
"type": "string"
}
},
"required": [
"name",
"value"
],
"additionalProperties": false
},
"volume": {
"type": "object",
"properties": {
"name": {
"description": "A named volume.",
"type": "string"
},
"source": {
"description": "The local path.",
"type": "string"
},
"target": {
"description": "The destination path within the container.",
"type": "string"
}
},
"required": [
"target"
],
"additionalProperties": false
},
"executable": {
"type": "object",
"properties": {
@ -136,7 +188,7 @@
"type": "string"
},
"replicas": {
"description": "Number of service replices to create.",
"description": "Number of service replicas to create.",
"type": "integer"
},
"bindings": {
@ -166,6 +218,40 @@
},
"additionalProperties": false
},
"repository": {
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"repository":
{
"description": "The repository url which will be cloned.",
"type": "string"
}
},
"required": [
"name",
"repository"
]
},
"include": {
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"include":
{
"description": "Path to tye.yaml file which will be used in the application.",
"type": "string"
}
},
"required": [
"name",
"include"
]
},
"image": {
"type": "object",
"properties": {
@ -173,10 +259,25 @@
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"volumes": {
"description": "Volumes to mount to the container.",
"type": "array",
"items": {
"$ref": "#/definitions/volume"
}
},
"image": {
"description": "The name of a Docker image.",
"type": "string"
},
"dockerFile": {
"description": "The Dockerfile to use.",
"type": "string"
},
"dockerFileContext": {
"description": "The Dockerfile context to run docker build on.",
"type": "string"
},
"env": {
"description": "Environment variables to use when launching.",
"type": "array",
@ -189,7 +290,7 @@
"type": "string"
},
"replicas": {
"description": "Number of service replices to create.",
"description": "Number of service replicas to create.",
"type": "integer"
},
"bindings": {
@ -201,8 +302,7 @@
}
},
"required": [
"name",
"image"
"name"
]
},
"ingress": {
@ -283,6 +383,13 @@
"$ref": "#/definitions/env-var"
}
},
"buildProperties": {
"description": "Build properties to use when launching or building a project.",
"type": "array",
"items": {
"$ref": "#/definitions/build-property"
}
},
"args": {
"description": "Command-line arguments to use when launching.",
"type": "string"
@ -292,7 +399,7 @@
"type": "boolean"
},
"replicas": {
"description": "Number of service replices to create.",
"description": "Number of service replicas to create.",
"type": "integer"
},
"bindings": {
@ -307,6 +414,19 @@
"name",
"project"
]
},
"extension":
{
"type": "object",
"properties": {
"name": {
"description": "Extension name.",
"type": "string"
}
},
"required": [
"name"
]
}
}
}
Loading…
Cancel
Save