Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added ability to run scripts locally without SSH. #43
@taylorotwell This is a first pass at getting this working. I'm sure you could come up with a more elegant way of doing it. The main idea is that I'd like to use Envoy to handle a deploy process and the first step is to run some commands locally before running the deploy commands remotely. We don't want to have Node dependencies or the build process on remote servers so we need to run all those processes on the local machine prior to deploy (which is essentially an rsync operation). This patch just bypasses the SSH process when the
Below is an example
@servers([ 'vagrant' => '127.0.0.1' ]) @task('init') git commit -am 'Initial commit.' git push origin master @endtask @task('install') composer install --no-dev npm install bower install @endtask @task('update') composer update --no-dev npm update bower update @endtask @task('keygen') php artisan key:generate @endtask @task('migrate') php artisan migrate --package="foo/bar" php artisan migrate @endtask @task('seed') php artisan db:seed @endtask @task('build') php artisan build @endtask @macro('setup') install keygen migrate seed build init @endmacro @macro('installer') install migrate build @endmacro @macro('updater') update migrate build @endmacro @macro('migrator') migrate @endmacro @macro('seeder') seed @endmacro @macro('builder') build @endmacro
added a commit
this pull request
May 30, 2014
@skovachev this is a pull request and not an official feature as of yet.
If you had a full stack installed on your host machine (your Mac let's say) then this would be your local machine. You could then have a VM (guest machine) or server (remote machine) that you wanted to run certain operations on while running others on your local machine. That's what this patch fixes. It also allows you to run these scripts from within your VM by treating your VM as the local.
That's what I do by running these sort of commands locally from within my "development" VM which then deploys to my "production" VM/server. Since Envoy remotes in every time this patch is needed to bypass the SSHing and just run the commands in the local terminal.
The alternative is to just setup Artisan commands or bash scripts or run envoy from your host machine and have it SSH into your VM but that means you would have to have dependencies running on your host machine too (which I don't want).