1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Using Ubuntu Trusty (14.04) for now
config.vm.box = "ubuntu/trusty64"
# Give Box it's own IP
config.vm.network "private_network", ip: "192.168.35.111"
# Would you rather use port forwarding? comment out that last line and add these:
# config.vm.network :forwarded_port, guest: 80, host: 8888
# config.vm.network :forwarded_port, guest: 3000, host: 3000 #common port for node, etc
# Sync parent folder. Clone this repo into project folder.
# I Like to work this way so I don't have vagrant files running all over my code.
# Parent folder will have the name of your app
config.vm.synced_folder "../", "/home/vagrant/"+File.basename(File.expand_path('..'))
# EDIT THE SCRIPT REFERENCED BELOW TO
config.vm.provision "shell", path: "setup.sh"
config.vm.provider "virtualbox" do |v|
#NAME THE VM -- You'll probably want to rename this box on a per-project basis.
#For now, it should inherit the name of the parent folder
v.name = "VDK - " + File.basename(File.expand_path('..'))
# 512 is pretty tight to run Node.js on, if you're in to that sort of thing. I've boosted this.
v.memory = 1024
end
end
|