Skip to content

Instantly share code, notes, and snippets.

@eddywashere
Last active August 29, 2015 14:05
Show Gist options
  • Save eddywashere/12d363ef692506f51fa2 to your computer and use it in GitHub Desktop.
Save eddywashere/12d363ef692506f51fa2 to your computer and use it in GitHub Desktop.
sample node + mongodb file
$install_script = <<SCRIPT
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get install -y mongodb-10gen
curl -L https://get.rvm.io | bash -s stable --ruby=2.1.1
source /home/vagrant/.rvm/scripts/rvm
gem install bundler
cd /sage && bundle install && npm install -g bower grunt-cli
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.vm.synced_folder ".", "/sage", type: "nfs"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
config.vm.provision "shell", inline: "apt-get install -y curl nodejs"
config.vm.provision "shell", inline: $install_script, privileged: false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment