0
|
1 # -*- mode: ruby -*-
|
|
2 # vi: set ft=ruby :
|
|
3
|
|
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
5 VAGRANTFILE_API_VERSION = "2"
|
|
6
|
|
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
8 config.vm.box = "precise64"
|
|
9 config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
|
10
|
|
11 config.vm.network "private_network", ip: "33.33.33.10"
|
|
12 config.vm.network "forwarded_port", guest: 80, host: 4567
|
|
13
|
|
14 config.vm.provision(:shell, :inline => <<-CMD)
|
|
15 # exit on error
|
|
16 set -e
|
|
17
|
|
18 echo "Installing node and deps ..."
|
|
19 if ! which node; then
|
|
20 apt-get update
|
|
21 apt-get install -y build-essential fontconfig
|
|
22 apt-get install -y python-software-properties
|
|
23 add-apt-repository ppa:chris-lea/node.js
|
|
24 apt-get update
|
|
25 apt-get install -y nodejs
|
|
26 fi
|
|
27 apt-get install -y vim
|
|
28
|
|
29 CMD
|
|
30
|
|
31 config.vm.provision(:shell, :inline => "cd /vagrant && npm install && npm test")
|
|
32 end
|