-
Notifications
You must be signed in to change notification settings - Fork 31
/
Vagrantfile
53 lines (38 loc) · 1.58 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "geerlingguy/debian9"
#Dev config
config.vm.define "phpcheckstyle_dev" do |phpcheckstyle_dev|
end
config.vm.provider "virtualbox" do |v|
v.memory = 3072
v.cpus = 4
v.name = "phpcheckstyle_dev"
end
config.vm.network "private_network", ip: "192.168.50.66"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
#
# Middleware installation
# The following provisions are executed as "root"
#
config.vm.provision "install_composer", privileged: true, type: "shell", inline: "/vagrant/vagrant_config/scripts/install_composer.sh"
#
# Middleware installation
# The following provisions are executed as "vagrant"
#
config.vm.provision "install_composer_libraries", privileged: false, type: "shell", inline: "/vagrant/vagrant_config/scripts/install_composer_libraries.sh"
#
# Documentation & Code quality & Developers provisions
# The following provisions are executed as "vagrant" and are only run when called explicitly
#
if ARGV.include? '--provision-with'
config.vm.provision "run_phpunit", privileged: false, type: "shell", inline: "/vagrant/vendor/bin/phpunit"
end
if ARGV.include? '--provision-with'
config.vm.provision "run_phpcheckstyle", privileged: false, type: "shell", inline: "/vagrant/phpcheckstyle.sh"
end
config.vm.provision "shell", inline: "echo 'The VM is ready on 192.168.50.66'", run: "always"
end