Merge branch 'develop' of https://github.com/friendica/friendica into develop
[friendica.git/.git] / Vagrantfile
1
2 server_ip = "192.168.56.10"
3 server_memory = "2048" # MB
4 server_timezone = "UTC"
5
6 public_folder = "/vagrant"
7
8 Vagrant.configure(2) do |config|
9   # Set server to Debian 11 / Bullseye 64bit
10   config.vm.box = "debian/bullseye64"
11
12   # Disable automatic box update checking. If you disable this, then
13   # boxes will only be checked for updates when the user runs
14   # `vagrant box outdated`. This is not recommended.
15   config.vm.box_check_update = true
16
17   # Create a hostname, don't forget to put it to the `hosts` file
18   # This will point to the server's default virtual host
19   # TO DO: Make this work with virtualhost along-side xip.io URL
20   config.vm.hostname = "friendica.local"
21
22   # Create a static IP
23   config.vm.network :private_network, ip: server_ip
24
25   # Share a folder between host and guest
26   # config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", owner: "www-data", group: "vagrant"
27   # config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", type: "nfs"
28   config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", owner: "www-data", group: "www-data", type: "virtualbox"
29
30   # Provider-specific configuration so you can fine-tune various
31   # backing providers for Vagrant. These expose provider-specific options.
32   config.vm.provider "virtualbox" do |vb|
33   #   # Display the VirtualBox GUI when booting the machine
34   #   vb.gui = true
35   #
36   #   # Customize the amount of memory on the VM:
37     vb.memory = server_memory
38
39     unless Vagrant.has_plugin?("vagrant-vbguest")
40       raise 'vagrant-vbguest plugin is not installed! Install with "vagrant plugin install vagrant-vbguest"'
41     end
42   end
43
44   config.vm.provider :libvirt do |libvirt|
45         libvirt.memory = server_memory
46   end
47
48   # Enable provisioning with a shell script.
49   config.vm.provision "shell", path: "./bin/dev/vagrant_provision.sh", privileged: true
50     # run: "always"
51     # run: "once"
52 end