Using .airplaneignore to skip files when deploying

When deploying Node.js and Python tasks, the Airplane CLI bundles and uploads your source code to Airplane builders.

Default ignores

For security and performance reasons, certain files and directories are ignored by default:

  • *.env
  • *.pyc
  • .git
  • .gitmodules
  • .hg
  • .idea
  • .next
  • .now
  • .npm
  • .svn
  • .terraform
  • .venv
  • .yarn
  • __pycache__
  • bin
  • dist
  • node_modules
  • npm-debug.log
  • out

Using an explicit .airplaneignore file

To customize this behavior and skip additional files, you can specify your own .airplaneignore file. This file uses the same syntax as .gitignore files (docs).

Rules found in the ignore file are added to the default set of rules. If the default rules skip something you want to include, you can use ! (see below) to re-include a path.

Like gitignore, patterns match within any subdirectory as long as it does not contain slashes or only ends in a slash:

Copied
1
# Ignores .git, node_modules in any subdirectory
2
.git
3
node_modules/

Patterns that start with a slash or contain a slash in the middle will match only relative to the root directory:

Copied
1
# Ignores node_modules/ but not childPackage/node_modules/
2
/node_modules/

You can use ! to make exceptions and re-include a path. The last line that matches a file will win:

Copied
1
# Ignore all paths, except the explicit paths below
2
*
3
# Include only these paths
4
!package.json
5
!package-lock.json
6
!src