forked from emilio2hd/myinterviews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
31 lines (23 loc) · 885 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.configure('2') do |config|
config.vm.box = 'ubuntu/trusty64'
# Check for updates running `vagrant box outdated`.
config.vm.box_check_update = false
config.vm.network 'private_network', ip: '192.168.33.101'
config.vm.synced_folder '.', '/opt/myinterviews'
config.vm.provider :virtualbox do |vb|
vb.memory = '1024'
end
env_vars = { APP_DIR: '/opt/myinterviews' }
# Only run the provisioning on the first 'vagrant up'
Dir['shell/install/*.sh'].sort.each do |script|
config.vm.provision :shell, path: script, env: env_vars, privileged: false
end
unless Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
config.vm.provision 'update_app', type: 'shell' do |update_app|
update_app.path = 'shell/update-application.sh'
update_app.env = env_vars
end
end
end