Running tasks on vagrant or on local - best practice

6 views
Skip to first unread message

Marko Blazekovic

unread,
Sep 11, 2017, 5:46:15 AM9/11/17
to Vagrant
Hi people. Have a question about vagrant. Well dilemma. :) When doing some actions like "git commit" or some other composer stuff should I run it on my local machine or SSH to vagrant and always do everything there. What is the benefit of doing it on my local machine?

Alvaro Miranda Aguilera

unread,
Sep 11, 2017, 7:07:54 AM9/11/17
to vagra...@googlegroups.com
depends

imagine you are doing a nice php site

you can have a vagrant project that setup the VM and install php + other components

and then, you could inside the VM git clone the site and use all the cool features of a native linux Filesystem

if you don'tneed that, then the normal out of the box experience is put the Vagrant file along your code, so when you do vagrant up the code will be mounted in /vagrant in the guest


So for that, you do 

git clone <repo> <path>
cd <path>
vagrant up

make sense?

On Mon, Sep 11, 2017 at 11:46 AM, Marko Blazekovic <adri...@gmail.com> wrote:
Hi people. Have a question about vagrant. Well dilemma. :) When doing some actions like "git commit" or some other composer stuff should I run it on my local machine or SSH to vagrant and always do everything there. What is the benefit of doing it on my local machine?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c8190b4e-4022-4462-8639-72f6c1edc7de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Robert Lilly

unread,
Sep 11, 2017, 9:56:34 AM9/11/17
to Vagrant
I tend to do the `git commit` and other repo related commands locally, outside of the VM, so that if I do a `vagrant destroy` I don't lose the git history. I always view the VM as ephemeral and anything that needs to persist even if the VM no longer exists needs to be on the local host machine.
Reply all
Reply to author
Forward
0 new messages