Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 72 forks source link

/bin/bash: worker.js: command not found #172

Open notflip opened 5 years ago

notflip commented 5 years ago

I added a new script to my ecosystem.config.js, upon publishing I keep getting the following error. (which sets my worker to errored).

2|worker   | /bin/bash: worker.js: command not found

this is my ecosystem declaration

module.exports = {
        apps: [
            {
                name: "api",
                script: "index.js",
                env_production: {
                    "NODE_ENV": "production",
                    "TZ": "UTC"
                }
            },
            {
                name: "cron",
                script: "cron.js --no-autorestart",
                // This is used when starting pm2 with env --production
                env_production: {
                    "NODE_ENV": "production",
                    "TZ": "UTC"
                }
            },
            {
                name: "worker",
                script: "worker.js --no-autorestart",
                // This is used when starting pm2 with env --production
                env_production: {
                    "NODE_ENV": "production",
                    "TZ": "UTC"
                }
            }
        ],
        deploy: {
            production: {
                ref: "origin/master",
                path: "/var/www/production",
                "post-deploy": "npm install && pm2 reload ecosystem.config.js --env production"
            }
        }
    };