-
Notifications
You must be signed in to change notification settings - Fork 8
/
VagrantFile
25 lines (24 loc) · 936 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
require 'yaml'
configuration = YAML.load_file('config.yml')
bootstrap_args = [configuration['mysql_pass'], configuration['xdebug_idekey']]
Vagrant.configure("2") do |config|
config.trigger.after :destroy do |trigger|
trigger.info = "After destroy script"
trigger.run = {path: "after_destroy.sh"}
end
config.vm.box = configuration['box']
config.vm.network "private_network", ip: configuration['ip']
config.vm.hostname = configuration['hostname']
config.vm.provider "virtualbox" do |v|
v.memory = configuration['memory']
v.cpus = configuration['cpus']
end
config.vm.synced_folder "source", "/vagrant/source",
type: "virtualbox",
create: true,
id: "vagrant-root",
owner: "vagrant",
group: "www-data",
mount_options: ["dmode=775,fmode=775"]
config.vm.provision "shell", path: "bootstrap.sh", privileged: false, args: bootstrap_args
end