Blueprints
Blueprints let you define deployments in a reusable, reviewable way. You can apply the same blueprint across multiple VMs to keep the runtime and the steps consistent.
Blueprints can be written as JSON, YAML, or TOML.
Example (JSON)
json
{
"name": "old-county-times",
"description": "Simple newspaper application",
"source": "remote",
"runtime": {
"type": "nodejs",
"version": "20"
},
"run_cmd": "npm start",
"build_cmd": "npm install",
"port": 3001,
"working_dir": "nodejs",
"static_dir": "",
"image": "",
"env_vars": {
"PORT": 3001
},
"secrets": {},
"remote": {
"url": "https://github.com/dployr-io/dployr-examples",
"branch": "master",
"commit_hash": ""
}
}Example (YAML)
yaml
name: old-county-times
description: Simple newspaper application
source: remote
runtime:
type: nodejs
version: "20"
run_cmd: npm start
build_cmd: npm install
port: 3001
working_dir: nodejs
static_dir: ""
image: ""
env_vars:
PORT: 3001
secrets: {}
remote:
url: https://github.com/dployr-io/dployr-examples
branch: master
commit_hash: ""Example (TOML)
toml
name = "old-county-times"
description = "Simple newspaper application"
source = "remote"
port = 3001
working_dir = "nodejs"
static_dir = ""
image = ""
run_cmd = "npm start"
build_cmd = "npm install"
[runtime]
type = "nodejs"
version = "20"
[env_vars]
PORT = 3001
[secrets]
[remote]
url = "https://github.com/dployr-io/dployr-examples"
branch = "master"
commit_hash = ""Fields explained
Required
nameA stable identifier for the deployment.sourceWhere the application comes from. Common values areremote,docker. This controls which source-specific block is used.runtimeWhich runtime to use on the VM.type: for examplenodejsversion: the runtime version to install/use (for example20)
run_cmdCommand to start the service process on the VM.portService port dployr should expect the app to listen on.
Source-specific
remoteUsed whensourceisremote.url: repository URLbranch: branch to deploy fromcommit_hash: optional pin to a specific commit
Optional
descriptionHuman-readable description.build_cmdCommand to run on the VM to build/prepare the app after fetching the source.working_dirDirectory (relative to the source root) to runbuild_cmdandrun_cmdfrom.env_varsPlain environment variables passed to the process.secretsSecret values, just likeenv_varsbut never streamed to clients.static_dirDirectory for static content (leave empty when not applicable).imageDocker image reference when using Docker-based deployments (leave empty when not applicable).