Skip to content

Commit

Permalink
fix: ensure that pm2 will update env variables on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Nov 23, 2020
1 parent 2524457 commit cae9fa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ Thumbs.db
*.csr
/dist/
.esm-cache
/temp/
/temp/
ssh_key
2 changes: 1 addition & 1 deletion deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ server {
if (pm2NeverRan) {
await ssh.execCommand(`${envVariables} npx pm2 start npm --name "${APP_NAME}" -- start`, {cwd: REMOTE_ROOT});
} else {
await ssh.execCommand(`${envVariables} npx pm2 reload ${APP_NAME}`, {cwd: REMOTE_ROOT});
await ssh.execCommand(`${envVariables} npx pm2 reload ${APP_NAME} --update-env`, {cwd: REMOTE_ROOT});
}
console.log("`Done!");
})()
Expand Down
1 change: 1 addition & 0 deletions src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2734,6 +2734,7 @@ export const constant: IConstant = {
version: environment.NPM_PACKAGE_DEPENDENCIES__WESSBERG_POINTER_EVENTS,
dependencies: [
// TODO: Also relies on "elementFromPoint" which there isn't a polyfill for yet. Add it to the dependencies when the polyfill is ready
// TODO: Also relies on EventTarget and will throw in browsers where EventTarget is not defined
"es.array.from",
"es.array.some",
"es.array.every",
Expand Down

0 comments on commit cae9fa1

Please sign in to comment.