Project configuration

Add common build and runtime configuration
An Airplane Project can be optionally configured with an airplane.yaml configuration file. If included, the airplane.yaml file must be located in the root directory of the project. We recommend always placing an airplane.yaml configuration file at the root of your project.
Copied
1
support-tools/ ⭐ PROJECT ROOT
2
┣ helpers/
3
┃ ┗ utils.ts
4
┣ customers.json
5
┣ my_task.airplane.ts
6
┣ package.json
7
┗ airplane.yaml ✅ INSIDE PROJECT
Copied
1
repo/
2
┣ support-tools/ ⭐ PROJECT ROOT
3
┃ ┣ helpers/
4
┃ ┃ ┗ utils.ts
5
┃ ┣ my_task.airplane.ts
6
┃ ┗ package.json
7
┗ airplane.yaml 🚫 OUTSIDE PROJECT
Use the airplane.yaml file to configure common build and runtime options for all of the tasks and views in the project.

Reference

JavaScript

These options are applied to all JavaScript tasks in the project.
javascriptobjectoptional
Top-level field under which you can specify configuration for all JavaScript tasks in the project.
yaml
Copied
1
javascript:
2
nodeVersion: "18"
3
envVars:
4
API_KEY:
5
config: STRIPE_API_KEY
javascript.nodeVersionenumoptional
Default: 18
Possible Values
"14"
"16"
"18"
The version of Node.js that the tasks should be executed with.
This field is optional, but highly recommended. If it is not included, tasks will be run with the latest version of Node.js that Airplane supports (currently Node.js 18) and automatically be upgraded when Airplane supports a new version of Node.js
javascript.envVarsobjectoptional
Environment variables that will be passed into all of the JavaScript tasks in the project.
Environment variables can be entered directly ("from value"), or you can reference Config variables ("from config variable"). Use config variables for secrets and/or values you want to share across multiple tasks.
Example:
yaml
Copied
1
javascript:
2
envVars:
3
# From value
4
NODE_ENV:
5
value: production
6
# From config variable
7
MY_SECRET:
8
config: MY_SECRET_CONFIG_VAR
You can also specify environment variables on a per-task basis rather than for an entire project. While per-task environment variables only apply at run-time, project-level environment variables in your airplane.yaml apply at run-time and build-time.
javascript.installstringoptional
A custom script that overrides the default install command.
Example:
yaml
Copied
1
javascript:
2
install: "yarn install --non-interactive --frozen-lockfile"
javascript.preinstallstringoptional
A custom script run before dependency installation during deployment.
Example:
yaml
Copied
1
javascript:
2
preinstall: yarn run generate
A custom script run after dependency installation during deployment.
Example:
yaml
Copied
1
javascript:
2
postinstall: yarn run generate
javascript.baseenumoptional
Possible Values
slim
full
The base image that the tasks are built with.
The slim image should be preferred as it is faster and lighter-weight. It contains the minimum packages needed to run a JavaScript Airplane task.
If your tasks use packages that are not included in the slim image (such as git), you can instead select the full image.
If your tasks use inline task configuration, the base defaults to slim. Other tasks default to full.

Python

These options are applied to all Python tasks in the project.
pythonobjectoptional
Top-level field under which you can specify configuration for all Python tasks in the project.
yaml
Copied
1
python:
2
version: "3.10"
3
envVars:
4
API_KEY:
5
config: STRIPE_API_KEY
python.versionenumoptional
Default: 3.10
Possible Values
3.7
3.8
3.9
3.10
3.11
The version of Python that the tasks are executed with.
This field is optional, but highly recommended. If it is not included, tasks will be run with the default of Python (currently Python 3.10) and automatically be upgraded when Airplane changes its default.
python.envVarsobjectoptional
Environment variables that will be passed into all of the Python tasks in the project.
Environment variables can be entered directly ("from value"), or you can reference Config variables ("from config variable"). Use config variables for secrets and/or values you want to share across multiple tasks.
Example:
yaml
Copied
1
python:
2
envVars:
3
# From value
4
NODE_ENV:
5
value: production
6
# From config variable
7
MY_SECRET:
8
config: MY_SECRET_CONFIG_VAR
You can also specify environment variables on a per-task basis rather than for an entire project. While per-task environment variables only apply at run-time, project-level environment variables in your airplane.yaml apply at run-time and build-time.
python.preinstallstringoptional
A custom script run before dependency installation during deployment.
Example:
yaml
Copied
1
python:
2
preinstall: echo "before install"
python.postinstallstringoptional
A custom script run after dependency installation during deployment.
Example:
yaml
Copied
1
python:
2
postinstall: echo "after install"
python.baseenumoptional
Possible Values
slim
full
The base image that the tasks are built with.
The slim image should be preferred as it is faster and lighter-weight. It contains the minimum packages needed to run a Python Airplane task.
If your tasks use packages that are not included in the slim image (such as git), you can instead select the full image.
If your tasks use inline task configuration, the base defaults to slim. Other tasks default to full.