When deploying an application
package with Vespa CLI,
a .vespaignore
file (similar to .gitignore
) can be
added to the package to prevent specific files or path patterns from being
included in the deployed package.
Ignoring files is useful when the Vespa application directory contains files that are only used for development purposes, and are not directly referenced by the application.
The .vespaignore
file must be placed at the same level
as services.xml. Having
multiple .vespaignore
at different path levels is not supported.
This is an example of a .vespaignore
file that excludes files
and directories rarely needed in an application package.
# exclude hidden files and readme
.DS_Store
.gitignore
README.md
# exclude feed input
ext/
# exclude auxiliary scripts
*.py
*.sh
The .vespaignore
format is is a subset of
the .gitignore
format, where:
#
are ignored and can be used for
commentsservices.xml
/
always denote a directory, e.g. the pattern foo/
will match the directory foo
(and any files below), but not the file
foo
Complex rules, such as negated patterns and recursive globbing
(**
) are not supported.