-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile.dist
More file actions
58 lines (42 loc) · 1.66 KB
/
Vagrantfile.dist
File metadata and controls
58 lines (42 loc) · 1.66 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
VAGRANTFILE_API_VERSION = "2"
name = "flashlight"
memory = "512"
cpu="2"
type="nfs"
ip = "192.168.10.20"
home = "/home/vagrant/project"
sync= "."
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#VM
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
if type
config.vm.synced_folder sync, home, type: type
else
config.vm.synced_folder sync, home
end
config.vm.network :private_network, ip: ip
config.vm.provider "virtualbox" do |v|
v.name = name
v.customize ["modifyvm", :id, "--memory", memory]
v.customize ["modifyvm", :id, "--cpus", cpu]
v.customize ["modifyvm", :id, "--vram", "8"]
end
#PROVISION
##update
config.vm.provision "shell", inline: "sudo apt-get -y update"
##curl
config.vm.provision "shell", inline: "which curl || sudo apt-get install -y curl"
##git
config.vm.provision "shell", inline: "which git || sudo apt-get install -y git"
##bash-completion
config.vm.provision "shell", inline: "sudo dpkg -l | grep bash-completion || ( sudo apt-get install -y bash-completion )"
##nodejs
config.vm.provision "shell", inline: "which npm || sudo apt-get update -y && sudo apt-get -y install python-software-properties python g++ make && sudo add-apt-repository -y ppa:chris-lea/node.js && sudo apt-get update -y && sudo apt-get -y install nodejs"
##nodemon
config.vm.provision "shell", inline: "which nodemon || sudo npm install -g nodemon@1.7.3"
##bower
config.vm.provision "shell", inline: "which bower || sudo npm install -g bower"
##project provision
config.vm.provision "shell", inline: "cd /home/vagrant/project && sudo sh provision/provision.sh"
end