-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
51 lines (42 loc) · 1.4 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
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.hostname = "machine-hostname.dev"
config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__auto: true
#Forward HTTP port
config.vm.network "forwarded_port", guest: 80, host: 8081
#Forward MySQL port
config.vm.network "forwarded_port", guest: 3306, host: 3306
#TODO: TEST
#config.vm.provider "virtualbox" do |vb|
# vb.memory = "512"
# vb.cpus = 1
#end
# Provision env tools (repos, tools, etc)
config.vm.provision 'shell' do |s|
ssl_verification = 0
s.path = 'provision-scripts/setup_tools.sh'
s.args = [ssl_verification]
end
# Provision HTTP server
config.vm.provision 'shell' do |s|
apache_servername = 'machine-hostname.dev'
apache_dirpath = '/vagrant'
apache_port = '80'
apache_directives = ''
s.path = 'provision-scripts/setup_apache.sh'
s.args = [apache_servername, apache_dirpath, apache_port, apache_directives]
end
# Provision PHP
config.vm.provision 'shell' do |s|
s.path = 'provision-scripts/setup_php.sh'
end
# Provision MariaDB
config.vm.provision 'shell' do |s|
mariadb_username = 'username'
mariadb_password = 'username'
mariadb_rootpassword = 'root'
mariadb_database = 'dbname'
s.path = 'provision-scripts/setup_mariadb.sh'
s.args = [mariadb_username, mariadb_password, mariadb_rootpassword, mariadb_database]
end
end