Skip to content

Instantly share code, notes, and snippets.

@ndrluis
Forked from fnando/Vagrantfile
Created May 21, 2013 12:37
Show Gist options
  • Save ndrluis/5619488 to your computer and use it in GitHub Desktop.
Save ndrluis/5619488 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "hellobits"
config.vm.box_url = "http://hellobits.com/vagrant/hellobits.box"
config.vm.synced_folder ".", "/Projects", id: "vagrant-root"
# config.vm.network :private_network, ip: "192.168.50.2"
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
forward_port[9200] # elasticsearch
forward_port[27017] # mongodb
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