In ecosystem.json, if the production environment has 3 hosts already setup and running fine, then a 4th host is added to production and "pm2 deploy production setup" is executed, it will fail with:
fatal: destination path '/iv/production/source' already exists and is not an empty directory.
That is due to setup already completed on the 3 other existing hosts.
One workaround would be to always add new hosts to the beginning of the array so the new hosts will complete. This will setup the new host then fail on the hosts that have already been setup. But at least it works.
In ecosystem.json, if the production environment has 3 hosts already setup and running fine, then a 4th host is added to production and "pm2 deploy production setup" is executed, it will fail with:
fatal: destination path '/iv/production/source' already exists and is not an empty directory.
That is due to setup already completed on the 3 other existing hosts.
One workaround would be to always add new hosts to the beginning of the array so the new hosts will complete. This will setup the new host then fail on the hosts that have already been setup. But at least it works.