Ignore Files
Pilum discovers services by walking the project for pilum.yaml files. Ignore patterns let you skip directories and services you don’t want deployed: examples, fixtures, archived services.
Where Patterns Come From
Pilum reads two files from the directory discovery starts in (the directory you run Pilum from, or the project root for pilum list and pilum compose):
.gitignore— read by default. Pass--no-gitignoreto skip it..pilumignore— Pilum-specific additions.
Patterns from both files are combined. If neither file yields any pattern, Pilum falls back to ignoring node_modules, .git and vendor. The fallback is not added once either file has patterns, so list those directories yourself if your .gitignore doesn’t.
Only .gitignore and .pilumignore in the discovery root are read; files in subdirectories are not.
Basic Usage
examplestest-*archived/Any directory or pilum.yaml matching these patterns is skipped. Ignored directories are not traversed.
Pattern Syntax
Pilum uses its own simple matcher, not full gitignore semantics. Patterns are matched against paths relative to the discovery root.
Names
A plain name matches any path component with that name, at any depth:
# Ignore any directory named "examples"examplesThis matches examples/, services/examples/ and deep/nested/examples/.
Rooted Paths
A pattern ending in / matches only that path from the root, and everything under it:
# Only the root examples/ directoryexamples/
# A specific nested directoryservices/legacy/examples/ matches examples/ but not services/examples/.
Globs
*, ? and [...] work as in shell globs, within one path component:
# Directories starting with "test-"test-*
# Directories ending with "-old"*-old
# Directories starting with an underscore_*A glob containing / is matched against the full relative path, so services/old-* matches services/old-api only.
Comments and Blank Lines
Lines starting with # and blank lines are ignored.
Not Supported
- Negation — lines starting with
!are skipped, so you can’t re-include something an earlier pattern excluded. - Leading
/—/distnever matches. Usedist/for a root-only match. **— matches like a single*within one component; it does not span directories.
Example .pilumignore
# Development and testingexamplesfixturestest-*testdata
# Dependencies and build outputdistnode_modulesvendor
# Archived/deprecated servicesarchived/*-deprecated*-old
# DocumentationdocsDiscovery Depth
Discovery also stops four levels below the root: a/b/c/d/pilum.yaml is found, a/b/c/d/e/pilum.yaml is not.
Debugging
pilum list shows what was discovered. To see what was skipped, run a dry run with --debug:
pilum dry-run --debug[debug] Loaded 4 ignore patterns[debug] Ignoring directory: archived[debug] Ignoring directory: examplesThe pattern count covers both files combined. pilum list has no --debug flag.
Common Patterns
Monorepo with Examples
my-project/├── .pilumignore # examples├── services/│ ├── api/│ │ └── pilum.yaml # ✓ discovered│ └── worker/│ └── pilum.yaml # ✓ discovered└── examples/ └── demo-service/ └── pilum.yaml # ✗ ignoredArchived Services
archived/*-deprecatedmy-project/├── services/│ ├── payments/│ │ └── pilum.yaml # ✓ discovered│ └── payments-deprecated/│ └── pilum.yaml # ✗ ignored└── archived/ └── old-api/ └── pilum.yaml # ✗ ignoredNext Steps
- Multi-Service Monorepo — Organizing multiple services
- Service Configuration — Configure your services
- Troubleshooting — When a service isn’t found