Skip to content

Instantly share code, notes, and snippets.

@dmwyatt
Created May 7, 2023 19:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmwyatt/6da4d7d258d06f946248bb3a0655785d to your computer and use it in GitHub Desktop.
Save dmwyatt/6da4d7d258d06f946248bb3a0655785d to your computer and use it in GitHub Desktop.
A start at a render.yaml json schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {"type": "string"},
"name": {"type": "string"},
"env": {"type": "string"},
"repo": {"type": "string"},
"region": {"type": "string"},
"plan": {"type": "string"},
"branch": {"type": "string"},
"rootDir": {"type": "string"},
"dockerCommand": {"type": "string"},
"numInstances": {"type": "integer"},
"healthCheckPath": {"type": "string"},
"envVars": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {"type": "string"},
"fromService": {
"type": "object",
"properties": {
"type": {"type": "string"},
"name": {"type": "string"},
"property": {"type": "string"}
},
"required": ["type", "name", "property"]
},
"fromGroup": {"type": "string"},
"generateValue": {"type": "boolean"},
"sync": {"type": "boolean"},
"value": {"type": "string"}
},
"required": ["key"]
}
},
"disk": {
"type": "object",
"properties": {
"name": {"type": "string"},
"mountPath": {"type": "string"},
"sizeGB": {"type": "integer"}
},
"required": ["name", "mountPath"]
},
"scaling": {
"type": "object",
"properties": {
"minInstances": {"type": "integer"},
"maxInstances": {"type": "integer"},
"targetMemoryPercent": {"type": "integer"},
"targetCPUPercent": {"type": "integer"}
},
"required": ["minInstances", "maxInstances"]
},
"buildCommand": {"type": "string"},
"startCommand": {"type": "string"},
"domains": {
"type": "array",
"items": {"type": "string"}
},
"autoDeploy": {"type": "boolean"},
"schedule": {"type": "string"},
"dockerfilePath": {"type": "string"},
"dockerContext": {"type": "string"},
"staticPublishPath": {"type": "string"},
"pullRequestPreviewsEnabled": {"type": "boolean"},
"buildFilter": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {"type": "string"}
},
"ignoredPaths": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["paths", "ignoredPaths"]
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {"type": "string"},
"name": {"type": "string"},
"value": {"type": "string"}
},
"required": ["path", "name", "value"]
}
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {"type": "string"},
"source": {"type": "string"},
"destination": {"type": "string"}
},
"required": ["type", "source", "destination"]
}
},
"ipAllowList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {"type": "string"},
"description": {"type": "string"}
},
"required": ["source", "description"]
}
},
"maxmemoryPolicy": {"type": "string"}
},
"required": ["type", "name", "env"]
}
},
"databases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"databaseName": {"type": "string"},
"user": {"type": "string"},
"ipAllowList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {"type": "string"},
"description": {"type": "string"}
},
"required": ["source", "description"]
}
}
},
"required": ["name", "databaseName"]
}
},
"envVarGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"envVars": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {"type": "string"},
"value": {"type": "string"},
"generateValue": {"type": "boolean"},
"sync": {"type": "boolean"}
},
"required": ["key"]
}
}
},
"required": ["name", "envVars"]
}
}
},
"required": ["services", "databases", "envVarGroups"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment