]> git.mxchange.org Git - friendica.git/blob - Vagrantfile
Merge branch 'develop' of github.com:annando/friendica into 1409-shadow-items
[friendica.git] / Vagrantfile
1
2 server_ip             = "192.168.22.10"
3 server_memory         = "384" # MB
4 server_timezone       = "UTC"
5
6 public_folder         = "/vagrant" 
7
8 Vagrant.configure("2") do |config|
9
10   # Set server to Ubuntu 12.04
11   config.vm.box = "precise64"
12
13   config.vm.box_url = "http://files.vagrantup.com/precise64.box"
14
15   # Create a hostname, don't forget to put it to the `hosts` file
16   # This will point to the server's default virtual host
17   # TO DO: Make this work with virtualhost along-side xip.io URL
18   config.vm.hostname = "friendica.dev"
19
20   # Create a static IP
21   config.vm.network :private_network, ip: server_ip
22
23   # If using VirtualBox
24   config.vm.provider :virtualbox do |vb|
25
26     # Set server memory
27     vb.customize ["modifyvm", :id, "--memory", server_memory]
28
29     # Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
30     # If the clock gets more than 15 minutes out of sync (due to your laptop going
31     # to sleep for instance, then some 3rd party services will reject requests.
32     vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
33
34     # Prevent VMs running on Ubuntu to lose internet connection
35     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
36     vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
37
38   end
39
40   # If using VMWare Fusion
41   config.vm.provider "vmware_fusion" do |vb, override|
42     override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
43     
44     # Set server memory
45     vb.vmx["memsize"] = server_memory
46
47   end
48
49   
50   ####
51   # Local Scripts
52   # Any local scripts you may want to run post-provisioning.
53   # Add these to the same directory as the Vagrantfile.
54   ##########
55
56   config.vm.synced_folder "./", "/vagrant/", :owner=> 'www-data', :group=>'vagrant', :mount_options => ['dmode=775', 'fmode=775']
57   config.vm.provision "shell", path: "./util/vagrant_provision.sh" 
58
59 end