-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
81 lines (57 loc) · 2.99 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# BOX SETTINGS
config.vm.box = "n0nag0n/firefly"
config.vm.define "firefly"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.customize ["modifyvm", :id, "--audio", "none"]
end
# NETWORKING
############################################################################
config.vm.hostname = "firefly"
# Private Network
config.vm.network "private_network", ip: "192.168.56.11"
# port forwarding must be enabled for vagrant share
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
# Public network:
# uncomment the lines and add your own config (bridge, ip, etc.)
# config.vm.network "public_network",
# :bridge => "en0: WLAN (Airport)",
# ip: "192.168.10.201", :netmask => "255.255.255.0", auto_config: true
# SYNCED FOLDERS
############################################################################
# DEFAULT:
config.vm.synced_folder "./public", "/var/www", :mount_options => ["dmode=777", "fmode=777"]
# NFS:
# you should try NFS share - it performs much better than the default synced folder!
# config.vm.synced_folder "./public", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=777"] }
# NFS in MacOS 10.15 Catalina and higher:
# due to a bug in Catalina you should use an absolute path to your directory:
# config.vm.synced_folder "/Volumes/Macintosh HD/Users/your-user/Vagrant/firefly/public", "/var/www", type: 'nfs', mount_options: ['rw', 'vers=3', 'tcp', 'fsc' ,'actimeo=1']
# RSYNC:
# if you are using a framework that contains many files rsync can provide best performance
# You can use vagrant rsync-auto to sync changes automatically to your vagrant box.
# config.vm.synced_folder "./public", "/var/www", type: "rsync", rsync__auto: true
# PROVISIONERS
############################################################################
# prepare the host
config.vm.provision "shell", inline: "sudo rm -rf /usr/local/vagrant && sudo mkdir /usr/local/vagrant/ && sudo chmod -R 777 /usr/local/vagrant"
# Virtual Hosts
config.vm.provision "file", source: "./provisioning/hosts", destination: "/usr/local/vagrant/"
# SSL Certificates
config.vm.provision "file", source: "./provisioning/ssl", destination: "/usr/local/vagrant/"
# php.ini configs
config.vm.provision "file", source: "./provisioning/php.ini", destination: "/usr/local/vagrant/"
# Execute Updates
# config.vm.provision "shell", path: "./provisioning/setup/updates.sh"
# Execute the apache setup scripts
config.vm.provision "shell", path: "./provisioning/setup/apache.sh"
# php.ini files
config.vm.provision "shell", path: "./provisioning/setup/php.sh"
# Execute Mail Hog
#config.vm.provision "shell", path: "./provisioning/setup/mailhog.sh"
# Execute Elastic Search
#config.vm.provision "shell", path: "./provisioning/setup/elasticsearch.sh"
end