Include
Use the!include tag to embed external files within a given YAML file.
The tag requires two properties:
By default, This configuration is valid:
path is relative to the current application’s directory (what you would define with source.root).
It is possible to include files from a directory parent to the folder however.For example, for the following project structure:.upsun/config.yaml
string
Use string to include an external file inline in the YAML file as if entered as a multi-line string.
For example, if you have a build hook like the following:
.upsun/config.yaml
build.sh
.upsun/config.yaml
path is relative to the current application’s directory, it is also possible to include a shell script from a directory parent to the folder however.
For example, for the following project structure:
.upsun/config.yaml
Please note that Upsun will execute this
../backend/scripts/common_build.sh script using Dash.binary
Use binary to include an external binary file inline in the YAML file.
The file is base64 encoded.
For example, you could include a favicon.ico file in the same folder as your app configuration.
Then you can include it as follows:
.upsun/config.yaml
yaml
Use yaml to include an external YAML file inline as if entered directly.
Because yaml is the default, you can use it without specifying the type.
For example, you could have your configuration for works defined in a worker.yaml file:
worker.yaml
.upsun/config.yaml
.upsun/config.yaml
.upsun/config.yaml
.upsun/apps/my-app.yaml file in the main .upsun/config.yaml.
.upsun/apps/my-app.yaml
.upsun/config.yaml
Archive
Use the!archive tag for a reference to an entire directory specified relative to where the YAML file is.
For example, you might want to define a configuration directory for your Solr service.
You might do so as follows:
.upsun/config.yaml
!archive tag means that the value for conf_dir isn’t the string solr/conf but the entire solr/conf directory.
This directory is in the .upsun/ directory, since that’s where the .upsun/config.yaml file is.
The solr/conf directory is then copied into the Upsun management system to use with the service.