Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitrocode/pm2-bug-update-env-variable
A reproduction of a bug in pm2
https://github.com/nitrocode/pm2-bug-update-env-variable
Last synced: 8 days ago
JSON representation
A reproduction of a bug in pm2
- Host: GitHub
- URL: https://github.com/nitrocode/pm2-bug-update-env-variable
- Owner: nitrocode
- Created: 2018-07-30T21:07:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-02T07:35:04.000Z (over 2 years ago)
- Last Synced: 2024-10-27T03:46:33.867Z (about 2 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PM2 Bug - Reloading environment variables with zero downtime
Issue [#3192](https://github.com/Unitech/pm2/issues/3192)
# Steps
Install dependencies
npm i
Remove stale logs if there are any
rm -f *.log
Start pm2 with the staging environment
npx pm2 start ecosystem.config.js --env staging
Reload app with zero downtime in a different environment. Also tried `restart`.
npx pm2 reload all --env production --update-env
Check app-0.log
cat app*.log
You will see
Server running at http://127.0.0.1:8000/
staging
Server running at http://127.0.0.1:8000/
stagingInstead of
Server running at http://127.0.0.1:8000/
staging
Server running at http://127.0.0.1:8000/
production