# Server Configuration
server_ip = "192.168.33.10"
server_memory = "384" # MB
server_timezone = "UTC"
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Set server to Ubuntu 12.04
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Create a static IP
config.vm.network :private_network, ip: server_ip
config.vm.synced_folder "./app/storage", "/vagrant/app/storage", owner: 'vagrant', group: 'www-data', mount_options: ["dmode=777,fmode=777"]
config.vm.synced_folder "./public/uploads", "/vagrant/public/uploads", owner: 'vagrant', group: 'www-data', mount_options: ["dmode=777,fmode=777"]
# If using VirtualBox
config.vm.provider :virtualbox do |vb|
# Set server memory
vb.customize ["modifyvm", :id, "--memory", server_memory]
# Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
# If the clock gets more than 15 minutes out of sync (due to your laptop going
# to sleep for instance, then some 3rd party services will reject requests.
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
end
# If using VMWare Fusion
config.vm.provider :vmware_fusion do |vb|
# Set server memory
vb.vmx["memsize"] = server_memory
end
config.vm.provision "shell", path: "./vagrant/install.sh"
config.vm.provision "shell", path: "./vagrant/setup.sh"
end