Unitech / pm2-deploy

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

Setup paths failed (Windows Host) #190

Open jugonzalez40 opened 4 years ago

jugonzalez40 commented 4 years ago

Hi, I'm trying to deploy a project from my local machine to a windows host (both windows), but gave this error:

image

The traslate of the description error is: The comand syntax is not correct

The host server have git and openSSH, actually could access by ssh in git-bash. If deploy locally in the host, works fine, so insted of the public ip put localhost

This is the abort error in the deploy bash https://github.com/Unitech/pm2-deploy/blob/987428a6ce402b47bb195ab93a8eafa5ad79c6f5/deploy#L213

And this is my ecosystem.json config


{
    "apps": [
        {
            "script": "./app.js",
            "restart_delay": 5000,
            "cwd": "./",
            "name": "Auditorias",
            "env": {
                "NODE_ENV": "development"
            },
            "env_production": {
                "NODE_ENV": "production"
            }
        }
    ],
    "deploy": {
        "development": {
            "user": "Administrador",
            "host": [
                {
                    "port": "9053",
                    "host": "<IP_HOST>"
                }
            ],
            "ref": "origin/development",
            "repo": "<THE_REPO>",
            "path": "C:/pm2test/Auditorias",
            "post-deploy": "npm install --production && pm2 startOrRestart ecosystem.json —-env development",
            "env": {
                "NODE_ENV": "development"
            }
        }
    }
}

So, it's posible to deploy from a windows machine to a windows machine, and what means test $? -eq 0 ?

NodeJS version: 8.9.0 PM2 version: 4.4.0 Local SO: windows 10 Host SO: Windows server 2012

Thanks.