forked from plone/mockup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
54 lines (40 loc) · 1.54 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
43
44
45
46
47
48
49
50
51
52
53
54
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
VBOXNAME = "mockup"
VBOXRAM = 2048
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.forward_agent = true
config.vm.box = "ubuntu/trusty64"
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
config.vbguest.installer = VagrantVbguest::Installers::Ubuntu
end
config.vm.define "virtualbox" do |virtualbox|
virtualbox.vm.network :private_network, ip: "10.0.1.2"
virtualbox.vm.network :public_network, ip: "172.16.1.3"
virtualbox.vm.network "forwarded_port", guest: 8000, host: 8000
virtualbox.vm.provision :shell,
:inline => "(grep -q -E '^mesg n$' /root/.profile && " \
"sed -i 's/^mesg n$/tty -s \\&\\& mesg n/g' /root/.profile && " \
"echo 'Ignore the previous error about stdin not being a tty. Fixing it now...') || exit 0;"
virtualbox.vm.provision :shell, :path => "provision.sh", :args=>VBOXNAME
config.vm.synced_folder ".", "/vagrant"
# if Vagrant.has_plugin?("vagrant-cachier")
# config.cache.scope = :box
# config.cache.enable :apt_lists
# config.cache.enable :apt
# config.cache.enable :npm
# end
end
config.vm.provider "virtualbox" do |vb|
vb.memory = VBOXRAM
end
if Vagrant.has_plugin?("vagrant-triggers")
config.trigger.after :destroy do
# delete node leftovers
run "rm -rf node_modules"
end
end
end