]> git.mxchange.org Git - friendica.git/blob - Vagrantfile
Vagrant: Allow to choose between Ubuntu 14.04 und 16.04
[friendica.git] / Vagrantfile
1
2 server_ip_trusty = "192.168.22.10"
3 server_ip_xenial = "192.168.22.11"
4 server_memory = "1024" # MB
5 server_timezone = "UTC"
6
7 public_folder = "/vagrant"
8
9 Vagrant.configure(2) do |config|
10   # Set server to Ubuntu 14.04
11   config.vm.define "trusty" do |trusty|
12     trusty.vm.box = "ubuntu/trusty64"
13
14     # Disable automatic box update checking. If you disable this, then
15     # boxes will only be checked for updates when the user runs
16     # `vagrant box outdated`. This is not recommended.
17     # config.vm.box_check_update = false
18
19     # Create a hostname, don't forget to put it to the `hosts` file
20     # This will point to the server's default virtual host
21     # TO DO: Make this work with virtualhost along-side xip.io URL
22     trusty.vm.hostname = "friendica-trusty.dev"
23
24     # Create a static IP
25     trusty.vm.network :private_network, ip: server_ip_trusty
26
27     # Share a folder between host and guest
28     trusty.vm.synced_folder "./", "/vagrant/", owner: "www-data", group: "vagrant"
29   end
30
31   # Set server to Ubuntu 16.04
32   config.vm.define "xenial" do |xenial|
33     xenial.vm.box = "ubuntu/xenial64"
34
35     # Disable automatic box update checking. If you disable this, then
36     # boxes will only be checked for updates when the user runs
37     # `vagrant box outdated`. This is not recommended.
38     # config.vm.box_check_update = false
39
40     # Create a hostname, don't forget to put it to the `hosts` file
41     # This will point to the server's default virtual host
42     # TO DO: Make this work with virtualhost along-side xip.io URL
43     xenial.vm.hostname = "friendica-xenial.dev"
44
45     # Create a static IP
46     xenial.vm.network :private_network, ip: server_ip_xenial
47
48     # Share a folder between host and guest
49     xenial.vm.synced_folder "./", "/vagrant/", owner: "www-data", group: "vagrant"
50   end
51
52
53   # Provider-specific configuration so you can fine-tune various
54   # backing providers for Vagrant. These expose provider-specific options.
55   config.vm.provider "virtualbox" do |vb|
56   #   # Display the VirtualBox GUI when booting the machine
57   #   vb.gui = true
58   #
59   #   # Customize the amount of memory on the VM:
60       vb.memory = server_memory
61   end
62
63   # Enable provisioning with a shell script. 
64   config.vm.provision "shell", path: "./util/vagrant_provision.sh"
65     # run: "always"
66     # run: "once"
67 end