'pm2 ignoring process name when started from a symbolic link
I have an ecosystem.config.js file similiar to the below
apps: [{
name: 'test 1',
script: 'yarn',
watch: 'true',
args: 'start',
cwd: '/home/<user>',
interpreter: '/bin/bash',
env: {
NODE_PORT: '8282',
NODE_ENV: 'production'
}
}]
}
If I do
pm2 start ecosystem.config.js
Everything works.....
1 │ test 1 │ default │ N/A │ fork │ 66100 │ 0s │ 0 │ online │ 0% │ 764.0kb
but if I have a symbolic link such as
ln -s ecosystem.config.js start
then do
pm2 start start // this is the name of the symbolic link
It starts the process OK, but gives the process the name of the symbolic link, instead of the one contained in the ecosytem.config.js file
id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ start │ default │ 1.0.0 │ fork │ 64305 │ 0s │ 0 │ online │ 0% │ 22.2mb
How can I resolve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
