]> git.openstreetmap.org Git - nominatim.git/blob - Vagrantfile
drop amenity=waste_prposal and amenity=hunting_stand
[nominatim.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 Vagrant.configure("2") do |config|
5   # Apache webserver
6   config.vm.network "forwarded_port", guest: 80, host: 8089
7   config.vm.network "forwarded_port", guest: 8088, host: 8088
8
9   # If true, then any SSH connections made will enable agent forwarding.
10   config.ssh.forward_agent = true
11
12   # Never sync the current directory to /vagrant.
13   config.vm.synced_folder ".", "/vagrant", disabled: true
14
15   checkout = "yes"
16   if ENV['CHECKOUT'] != 'y' then
17     checkout = "no"
18   end
19
20   config.vm.provider "hyperv" do |hv, override|
21     hv.memory = 2048
22     hv.linked_clone = true
23     if ENV['CHECKOUT'] != 'y' then
24       override.vm.synced_folder ".", "/home/vagrant/Nominatim", type: "smb", smb_host: ENV['SMB_HOST'] || ENV['COMPUTERNAME']
25     end
26   end
27
28   config.vm.provider "virtualbox" do |vb, override|
29     vb.gui = false
30     vb.memory = 2048
31     vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant","0"]
32     if ENV['CHECKOUT'] != 'y' then
33       override.vm.synced_folder ".", "/home/vagrant/Nominatim"
34     end
35   end
36
37   config.vm.provider "parallels" do |prl, override|
38     prl.update_guest_tools = false
39     prl.memory = 2048
40     if ENV['CHECKOUT'] != 'y' then
41       override.vm.synced_folder ".", "/home/vagrant/Nominatim"
42     end
43   end
44
45   config.vm.provider "libvirt" do |lv, override|
46     lv.memory = 2048
47     lv.nested = true
48     if ENV['CHECKOUT'] != 'y' then
49       override.vm.synced_folder ".", "/home/vagrant/Nominatim", type: 'nfs', nfs_udp: false
50     end
51   end
52
53   config.vm.define "ubuntu22", primary: true do |sub|
54       sub.vm.box = "generic/ubuntu2204"
55       if RUBY_PLATFORM.include?('darwin') && RUBY_PLATFORM.include?('arm64')
56         # Apple M processor
57         sub.vm.box = 'luminositylabsllc/ubuntu-22.04-arm64'
58       end
59       sub.vm.provision :shell do |s|
60         s.path = "vagrant/Install-on-Ubuntu-22.sh"
61         s.privileged = false
62         s.args = [checkout]
63       end
64   end
65
66   config.vm.define "ubuntu22-apache" do |sub|
67       sub.vm.box = "generic/ubuntu2204"
68       sub.vm.provision :shell do |s|
69         s.path = "vagrant/Install-on-Ubuntu-22.sh"
70         s.privileged = false
71         s.args = [checkout, "install-apache"]
72       end
73   end
74
75   config.vm.define "ubuntu22-nginx" do |sub|
76       sub.vm.box = "generic/ubuntu2204"
77       sub.vm.provision :shell do |s|
78         s.path = "vagrant/Install-on-Ubuntu-22.sh"
79         s.privileged = false
80         s.args = [checkout, "install-nginx"]
81       end
82   end
83
84   config.vm.define "ubuntu24" do |sub|
85       sub.vm.box = "bento/ubuntu-24.04"
86       sub.vm.provision :shell do |s|
87         s.path = "vagrant/Install-on-Ubuntu-24.sh"
88         s.privileged = false
89         s.args = [checkout]
90       end
91   end
92
93   config.vm.define "ubuntu24-apache" do |sub|
94       sub.vm.box = "bento/ubuntu-24.04"
95       sub.vm.provision :shell do |s|
96         s.path = "vagrant/Install-on-Ubuntu-24.sh"
97         s.privileged = false
98         s.args = [checkout, "install-apache"]
99       end
100   end
101
102   config.vm.define "ubuntu24-nginx" do |sub|
103       sub.vm.box = "bento/ubuntu-24.04"
104       sub.vm.provision :shell do |s|
105         s.path = "vagrant/Install-on-Ubuntu-24.sh"
106         s.privileged = false
107         s.args = [checkout, "install-nginx"]
108       end
109   end
110 end