From bb7693a9077daa58c1c3dd087e5b70f9f557d15f Mon Sep 17 00:00:00 2001 From: Johns Gresham Date: Sat, 1 Mar 2025 16:35:32 -0800 Subject: [PATCH] docs: pm2 restart doesn't pick up new env vars --- docs/features/environment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/environment.md b/docs/features/environment.md index 0ffe998..8987e9e 100644 --- a/docs/features/environment.md +++ b/docs/features/environment.md @@ -10,6 +10,7 @@ permalink: /docs/usage/environment/ PM2 will inject environment in this order when **starting** a new process : - First the PM2 CLI will use its environment so the current environment of your shell will be injected. +- When a new shell env variable is added, you will need to `pm2 delete` and `pm2 start` the process. `pm2 restart` doesn't pick up new shell environment variables. - PM2 will then inject the environment that you can configure with the ecosystem file : ```javascript