@woodl/flightplan
v2.3.1
Published
- `1.0.0` - Created NPM package - `1.0.1` - Small update - `2.0.0` - Depend on [pull-request](https://github.com/pstadler/flightplan/pull/182) to skip Fibers - `2.0.1` - Bugfix - `2.0.2` - Dynamic choices - `2.1.0` - Updated npmp to currently
Readme
@woodl / flightplan
Version history
1.0.0- Created NPM package1.0.1- Small update2.0.0- Depend on pull-request to skip Fibers2.0.1- Bugfix2.0.2- Dynamic choices2.1.0- Updated npmp to currently latest version, improves speed of installation a bit2.1.2- Use npx instead of package.json script2.2.0- Support for Angular v20+ new output directory structure (dist-new/browser) - Breaking change2.3.0- Memory fixes (TI-1655):max_memory_restartin PM2 template (configurable viaconfig.pm2.maxMemoryRestartor per-targetpm2.maxMemoryRestart, default 1500M); systemd drop-in provisioning step withMALLOC_ARENA_MAX=2+ nvm PATH (fixes glibc arena leak and node-version-on-reboot landmine); pm2-logrotate install (100M / retain 7 / compress)2.3.1- Removed the pm2-logrotate install again: rotation deletes logs older than the retention window, and all logs must be kept (customer requirement). Log shipping to S3 is planned instead.
Configuration
Passed in via flightplan.config.js of the consuming project:
pm2: {
script: `/server/app.www.js`, // app entry point, relative to the active deploy
maxMemoryRestart: '1500M', // optional, default 1500M — PM2 recycles a worker above this
},
target: {
rel: {
// ...
pm2: { maxMemoryRestart: '800M' }, // optional per-target override (small droplets)
},
},Every deploy also (re)writes /etc/systemd/system/pm2-root.service.d/tactile.conf on the target droplet with:
MALLOC_ARENA_MAX=2— caps glibc malloc-arena fragmentation from native threads (sharp/zlib), which otherwise grows worker RSS unboundedly until the kernel OOM-killer strikes. Note this only takes effect on the next PM2 daemon start (reboot or manualsystemctl stop pm2-root && pm2 kill && systemctl start pm2-root) — PM2's own config env cannot deliver it.PATHpointing at the droplet's nvm default node — without this, a droplet reboot resurrects the app under the system node.
Suggested improvements
- Make first ssh connection in such a way that we skip "yes" / "no" question first ssl
- Retry functionality
- Run code to see if it doesn't give an instant error
Adding a new version
# git commit -am "Usage of project specific query added"
# npm version patch # minor, major
# git push
npm publish