New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to run scripts locally without SSH. #43
Conversation
…until it is accepted or better alternative is in place
Is this part of the main Envoy source? I can't seem to get it to work. |
@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). |
Thanks you! That makes sense. I guess a solution would be to just use your fork, or make one of my own. |
+1 for this feature |
+1 on this too! |
+1 I would love to see this |
Pretty please, @taylorotwell! |
+1 from me too |
This is a nice addition. Sometimes we want to run several commands etc, would be nice place to make them work localy. even nice to make some migrate + seeds + refresh + test combos |
Added ability to run scripts locally without SSH.
Fantastic! Great work! |
I had to look around a bit to find out that you can use envoy locally. I thought it would be great if it was reference at the docs. Reference: laravel/envoy#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
$target
is a localhost hostname.Below is an example
Envoy.blade.php
that will run tasks and macros using this patch. An example run would be something likeenvoy run installer
.