Hey guys, I'm trying to deploy using a custom ecosystem with a different filename however it is trowing an error. There's any way to use a different name for the ecosystem conf file?
I would like to have 2 different ecosystem files to because I need deploy and execute only one script in a different server.
pm2 deploy tmp_ecosystem.json5 dev
--> Deploying to dev environment
--> on host 45.55.134.97
โ deploying
โ hook pre-deploy
โ fetching updates
Fetching origin
From bitbucket.org:gettydata/gd-bot
196856a..39c905b master -> origin/master
โ resetting HEAD to origin/master
HEAD is now at 39c905b deploy
โ executing post-deploy `npm install && pm2 startOrRestart ecosystem.json`
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
Configuration file ecosystem.json is missing. Action canceled.
post-deploy hook failed
Deploy failed
I missed the command after post-deploy. :dash:
^^
Could you explain that a bit more?
I get this problem, and still can't figure out what to do...
Can you give us more clarification about how you fixed the issue?
@maroun-baydoun : Have a look at this link
By default the post-deploy is set with some logic dedicated to PM2.
Internally if this attribute is not set, the post-deploy will call pm2 startOrRestart ecosystem.json"
If the name of your ecosystem the file is not ecosystem.json then you need to add a "post-deploy" : "pm2 startOrRestart YOUR_FILE.json" in your configuration file :)
I'm leaving this here as much for myself as others as its the second time its burned me.
pm2 deploy <key> setup before running pm2 deploy <key>ie
pm2 deploy production setup
then
pm2 deploy production
Hey I just want to ask one simple question based on the error I get
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โโโ [email protected]
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
[PM2][ERROR] File ecosystem.json not found
post-deploy hook failed
Deploy failed
It looks like npm install command works fine but after its execution nothing works fine. My thinking behind this error is, I'm getting this error because I'm not having the ecosystem.json file existing on my project root which is in remote server but I do have it on my local machine. Must I commit this file[ecosystem.json] ?
Most helpful comment
I'm leaving this here as much for myself as others as its the second time its burned me.
You must run
pm2 deploy <key> setupbefore runningpm2 deploy <key>ie
pm2 deploy production setupthen
pm2 deploy production