Skip to content

Instantly share code, notes, and snippets.

@carlosazaustre
Created February 17, 2014 07:27
Show Gist options
  • Save carlosazaustre/9046232 to your computer and use it in GitHub Desktop.
Save carlosazaustre/9046232 to your computer and use it in GitHub Desktop.
Vagrantfile for Node.js development enviroment
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.forward_port 3000, 3000
config.vm.share_folder "app", "/home/vagrant/app", "app"
# Uncomment the following line to allow for symlinks
# in the app folder. This will not work on Windows, and will
# not work with Vagrant providers other than VirtualBox
# config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/app", "1"]
config.vm.provision :chef_solo do |chef|
chef.add_recipe "nodejs"
chef.add_recipe "mongodb-debs"
# chef.add_recipe "redis-server"
chef.json = {
"nodejs" => {
"version" => "0.10.22"
# uncomment the following line to force
# recent versions (> 0.8.5) to be built from
# the source code
# , "from_source" => true
}
}
end
config.vm.provision :shell, :inline => "sudo apt-get install -y build-essential --no-install-recommends"
config.vm.provision :shell, :inline => "sudo apt-get install -y redis-server --no-install-recommends"
config.vm.provision :shell, :inline => "sudo apt-get install -y ruby1.9.1-dev --no-install-recommends"
config.vm.provision :shell, :inline => "sudo apt-get install -y ruby1.9.3 --no-install-recommends"
config.vm.provision :shell, :inline => "sudo gem install cf"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment