Using .airplaneignore to skip files when deploying

When deploying JavaScript 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.local
  • .env.*.local
  • *.pyc
  • .git
  • .gitmodules
  • .hg
  • .idea
  • .next
  • .now
  • .npm
  • .svn
  • .*.swp
  • .terraform
  • .venv
  • .yarn/install-state.gz
  • .yarn/unplugged
  • __pycache__
  • node_modules
  • npm-debug.log
  • .airplane
  • .airplane-view

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