forked from os-js/OS.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
42 lines (36 loc) · 1.29 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Install Plugins...
unless Vagrant.has_plugin?("vagrant-hostsupdater") and Vagrant.has_plugin?("vagrant-vbguest")
unless Vagrant.has_plugin?("vagrant-hostsupdater")
system('vagrant plugin install vagrant-hostsupdater')
end
unless Vagrant.has_plugin?("vagrant-vbguest")
system('vagrant plugin install vagrant-vbguest')
end
end
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--cpus", 1]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.name = "osjs"
end
config.ssh.forward_agent = true
config.vm.hostname = "osjs.vagrant.dev"
config.vm.network :private_network, ip: "192.168.60.4"
config.vm.provision "shell", inline: <<-SHELL
# Install dependencies
echo "Installing apt dependencies"
apt-get install -y git nodejs npm nodejs-legacy >/dev/null
npm install --silent --quiet -g grunt-cli supervisor >/dev/null
# Install OS.js
echo "Installing OS.js"
git clone https://github.com/os-js/OS.js.git >/dev/null
pushd OS.js
npm install --production >/dev/null
grunt >/dev/null
SHELL
end