Feature request: Hook that runs after (re)starting an app
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
For many use cases, it would be awesome to have a hook which is executed after an app is (re)started, which could do all kinds of tasks.
My specific use-case is to retrieve relevant secrets from a vault system and injecting them the booting app. By doing this in a hook which runs within the PM2 God module process space, and applying some additional tricks, a setup can be constructed where PM2 plays the role of 'trusted intermediate': It will be the only entity in the system with access to the Vault system and deliver appropriate secrets to appropriate apps.
Other possible use-cases could be integration with a service-discovery system, service health monitoring, and many more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating PM2's application restart lifecycle and existing hook mechanisms, then define the hook's timing, process context, and secret-delivery behavior before implementation; done means a specified post-restart hook works reliably for the described use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100