Created
April 18, 2013 12:06
-
-
Save fnando/5412225 to your computer and use it in GitHub Desktop.
My current Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "hellobits" | |
config.vm.synced_folder ".", "/Projects", id: "vagrant-root" | |
forward_port = ->(guest, host = guest) do | |
config.vm.network :forwarded_port, | |
guest: guest, | |
host: host, | |
auto_correct: true | |
end | |
forward_port[3000] # rails | |
forward_port[9292] # rack | |
forward_port[4567] # sinatra | |
forward_port[1080] # mailcatcher | |
forward_port[8888] # jasmine | |
forward_port[3306] # mysql | |
forward_port[1234] # node | |
forward_port[5432] # postgresql | |
forward_port[6379] # redis | |
forward_port[80, 8080] # nginx/apache | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
vb.customize [ | |
"setextradata", :id, | |
"VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1" | |
] | |
vb.customize [ | |
"setextradata", :id, | |
"VBoxInternal/Devices/ahci/0/LUN#[0]/Config/IgnoreFlush", "1" | |
] | |
end | |
config.vm.provider(:vmware_fusion) do |v| | |
v.vmx["memsize"] = "2048" | |
v.vmx["MemTrimRate"] = "0" | |
v.vmx["sched.mem.pshare.enable"] = "FALSE" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment