Project configuration (airplane.yaml)
An Airplane Project can be optionally configured with
an
airplane.yaml
configuration file. This file is used to configure common build and runtime
options for all of the tasks and views in the project.See Project documentation for more information.
JavaScript
JavaScript
These options are applied to all JavaScript tasks in the project.
javascript
object
Top-level field under which you can specify configuration for all JavaScript tasks in the project.
yamlCopied1javascript:2nodeVersion: "18"3envVars:4API_KEY:5config: STRIPE_API_KEY
Possible Values |
"14" |
"16" |
"18" |
"20" |
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 default version of Node.js (currently Node.js 18) and automatically be upgraded when the default
changes.
javascript.envVars
object
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:
yamlCopied1javascript:2envVars:3# From value4NODE_ENV:5value: production6# From config variable7MY_SECRET:8config: 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.install
string
A custom script that overrides the default install command.
Example:
yamlCopied1javascript:2install: "yarn install --non-interactive --frozen-lockfile"
javascript.preinstall
string
A custom script run before dependency installation during deployment.
Example:
yamlCopied1javascript:2preinstall: yarn run generate
javascript.postinstall
string
A custom script run after dependency installation during deployment.
Example:
yamlCopied1javascript:2postinstall: yarn run generate
javascript.base
enum
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
Python
These options are applied to all Python tasks in the project.
python
object
Top-level field under which you can specify configuration for all Python tasks in the project.
yamlCopied1python:2version: "3.11"3createVenv: true4envVars:5API_KEY:6config: STRIPE_API_KEY
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.11) and automatically be upgraded when Airplane changes
its default.
python.createVenv
boolean
If
true
, Airplane will automatically create a
virtual environment to manage your task's
dependencies. This is recommended as it simplifies dependency management for Python tasks.This setting only applies to local development.
See Virtual environments to learn more.
python.envVars
object
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:
yamlCopied1python:2envVars:3# From value4NODE_ENV:5value: production6# From config variable7MY_SECRET:8config: 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.preinstall
string
A custom script run before dependency installation during deployment.
Example:
yamlCopied1python:2preinstall: echo "before install"
python.postinstall
string
A custom script run after dependency installation during deployment.
Example:
yamlCopied1python:2postinstall: echo "after install"
python.base
enum
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
.Views
Views
These options are applied to all views in the project.
view
object
Top-level field under which you can specify configuration for all views in the project.
yamlCopied1view:2envVars:3API_KEY:4config: STRIPE_API_KEY
view.envVars
object
Environment variables that will be passed into all of the views in the project.
Environment variables can be entered directly ("from value"), or you can reference
Config variables ("from config variable"). Use config variables for values you
want to share across multiple views.
Note that environment variables can be seen in the View source code in the browser, so anybody with
access to the view can see the value of the environment variable. Environment variables prefixed
with
BUILD_
will not be included in the View source code and can only be used at build time.If you need to use a secret in a view, we recommend pulling business logic that requires the secret
into a task and and using a task environment variable.
Example:
yamlCopied1view:2envVars:3# From value4MY_URL:5value: "https://airplane.dev"6# From config variable7MY_CONFIG:8config: MY_CONFIG_VAR
You can also specify environment variables on a
per-view basis rather than for an entire project.
While per-view environment variables only apply at run-time, project-level environment variables in
your
airplane.yaml
apply at run-time and build-time.