-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
31 lines (22 loc) · 892 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 1.7.2"
# Check for plugin
unless Vagrant.has_plugin?("vagrant-triggers")
raise 'vagrant-triggers is not installed!'
end
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty32'
config.vm.hostname = 'mock-builder-vm'
config.vm.network :forwarded_port, guest: 2000, host: 2000
config.vm.synced_folder "../slate_themes", "/srv/slate_themes"
config.vm.provision :shell, path: 'bootstrap.sh', keep_color: true
config.trigger.after [:up], stdout: true, stderr: true do
info "Starting Mock Builder..."
run_remote "cd /srv/mock_builder/mock_builder && ruby mock_server.rb --daemon 0"
end
config.trigger.before [:halt], stdout: true, stderr: true do
info "Stopping Mock Builder..."
run_remote "sudo kill -9 $(ps ax | grep '[m]ock_server.rb' | awk '{print $1}')"
end
end