Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9 KiB

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