This repository was archived by the owner on Feb 23, 2024. It is now read-only.
forked from anwarishak/universal-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathVagrantfile-sample
More file actions
60 lines (47 loc) · 1.92 KB
/
Copy pathVagrantfile-sample
File metadata and controls
60 lines (47 loc) · 1.92 KB
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
54
55
56
57
58
59
60
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This Vagrantfile is intended to be used with universal-vagrant
# https://github.com/ThePeach/universal-vagrant
VAGRANTFILE_API_VERSION = "2"
# Change the path to universal-vagrant, including a trailing slash
PATH_TO_UNIVERSAL_VAGRANT = "../universal-vagrant-peach/"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Basic box
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.hostname = "projectname"
# Networking: port forwarding
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: false
# Synced folders (also add items here to set folder permissions)
# Vagrant v1.1+
config.vm.synced_folder "./", "/vagrant", id: "vagrant-root",
owner: "vagrant",
group: "www-data",
mount_options: ["dmode=775,fmode=664"]
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--hwvirtex", "off"]
end
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.provision "shell",
path: PATH_TO_UNIVERSAL_VAGRANT + "scripts/bootstrap.sh"
config.vm.provision "shell",
path: PATH_TO_UNIVERSAL_VAGRANT + "scripts/LAMP-install.sh",
args: "-v"
# comment the next 3 lines if mysql databases are not required
config.vm.provision "shell",
path: PATH_TO_UNIVERSAL_VAGRANT + "scripts/mysql.sh",
args: "-v"
# uncomment the next 2 lines if you need Yii 1.1 installed in your box
#config.vm.provision "shell",
# path: PATH_TO_UNIVERSAL_VAGRANT + "scripts/yii-1.1.sh"
# Do extra bits of provisioning/configuration, amend and uncomment if required
#$script = "
#echo \"Doing some last minute provisioning\"
#rm /var/www/default/public_html
#ln -sfn /vagrant/webroot /var/www/default/public_html
#service apache2 restart
#"
#
#config.vm.provision "shell", inline: $script
end