forked from JamBrain/DairyBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
39 lines (32 loc) · 1.49 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.box_version = "2.5"
config.exec.commands '*', directory: '/vagrant/www'
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/www", "1"]
end
config.vm.network "private_network", ip: "192.168.48.48"
# config.vm.network "public_network"
config.vm.hostname = "dairybox"
config.vm.synced_folder "www", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
config.vm.synced_folder "dev", "/var/www/sandbox/dev", :mount_options => ["dmode=775", "fmode=664"]
# Store an environment variable that lets us know what the host machine is (Windows, or a Unix)
if Vagrant::Util::Platform.windows? then
config.vm.provision :shell, inline: "echo \"export WINDOWS_HOST=1\nexport HOST_OS=windows\" >> /etc/profile"
else
config.vm.provision :shell, inline: "echo \"export UNIX_HOST=1\nexport HOST_OS=unix\" >> /etc/profile"
end
if Vagrant::Util::Platform.darwin? then
config.vm.provision :shell, inline: "echo \"export MAC_HOST=1\nexport HOST_OS=mac\" >> /etc/profile"
end
if Vagrant::Util::Platform.linux? then
config.vm.provision :shell, inline: "echo \"export LINUX_HOST=1\nexport HOST_OS=linux\" >> /etc/profile"
end
config.vm.provision :shell, path: "provision/bootstrap.sh"
# Mailcatcher
config.vm.provision :shell, inline: "/home/vagrant/.rbenv/shims/mailcatcher --http-ip=0.0.0.0"
end