Open jeffhmngi opened 8 years ago
I've considered building that directly into the deployment itself. So just replace the files directly, but maybe more complicated then the script you showed. Maybe you could use scp directly overwrite the built files if doing from the deployment is not feasible. If using mupx you might find this process easy via docker exec command as well. It otherwise sounds mayne like a permissions issue. There's various Googleable ideas to check up on.
I did manage to get some more output from when this is running from cron.
I have 4 different meteor projects with different codebases and they all return this error when MUP is run from cron.
''' events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1011:11) at Process.ChildProcess._handle.onexit (child_process.js:802:34) '''
This is running with the same user in cron as it is when run from an interactive shell. So It's not a permissions issue. Feels like MUP is looking for an env variable or something in a path that isn't there when invoked from cron, but is there when run from a normal shell.
I have a set of scripts that watch a git repo for changes. If changes are detected, it does a git pull to fetch the updated files, then invokes another script to run the mup deploy.
The script is passed 2 arguments, the path of the meteor project, and the branch to deploy.
Script looks like so:
This script works 100% of the time if manually invoked from a shell.
The script fails 100% of the time when run from cron. The log looks like so:
With no other output in /var/log/upstart logs or elsewhere.