Skip to content
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

Vagrant repo location #33

Open
moore3071 opened this issue Feb 12, 2017 · 2 comments
Open

Vagrant repo location #33

moore3071 opened this issue Feb 12, 2017 · 2 comments
Assignees

Comments

@moore3071
Copy link
Member

According to the documentation the repo should be in /home/vagrant/cwdg-website. When booted the vagrant box syncs the repo to /vagrant due to the vagrantfile line 13-16:

  if `uname`.include? "Linux"
    config.vm.synced_folder '.', '/vagrant', type: 'rsync'
  elsif `uname`.include? "Darwin"
    config.vm.synced_folder ".", "/home/vagrant/cwdg-website"
  end

My guess is that uname is running on the host machine, but I'll analyze both cases.

  • If uname is being run on the vm vagrant makes, then why is there a case for Mac (Darwin)?
  • If not then
    • aren't we missing the case of other OSs especially Windows which is the reason the vagrant box exists?
    • Why do we sync to two different locations depending on host OS?
@J3RN
Copy link

J3RN commented Feb 12, 2017

I have an assortment of commentary on this. Here goes:

  1. The vagrant box is scarcely useful as this is no longer a Rails app. The only reason I can think of to use it is if Ruby is borked or hard to install on your system. On second thought, Windows. Regardless, Vagrant is notoriously hard to use. I would push for a Docker container over this, though I believe Docker is equally difficult to utilize, simply because of their good PR. I can take a swipe at that.
  2. The Vagantfile, and thus, uname runs on the host machine.
  3. I have no idea why the syncing locations are different, or why Windows is ignored. At some point, someone probably updated one location and forgot the other. type: rsync was important at one point because the default method of syncing didn't work well with Linux. I imagine that has been fixed in the intervening years. TL;DR: We can probably replace this whole thing with a single line.

@moore3071
Copy link
Member Author

Okay, my PR should fix J3RN's point three. As far as Docker vs Vagrant, I think we need to have further conversation on the two. Neither was difficult to set up on my system, but I'm obviously not running Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants