4 Vagrant.configure("2") do |config|
5 # use official ubuntu image for virtualbox
6 config.vm.provider "virtualbox" do |vb, override|
7 override.vm.box = "ubuntu/noble64"
8 override.vm.synced_folder ".", "/srv/openstreetmap-website"
9 vb.customize ["modifyvm", :id, "--memory", "4096"]
10 vb.customize ["modifyvm", :id, "--cpus", "2"]
11 vb.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
14 # Use sshfs sharing if available, otherwise NFS sharing
15 sharing_type = Vagrant.has_plugin?("vagrant-sshfs") ? "sshfs" : "nfs"
17 # use third party image and sshfs or NFS sharing for lxc
18 config.vm.provider "lxc" do |_, override|
19 override.vm.box = "generic/ubuntu2404"
20 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
23 # use third party image and sshfs or NFS sharing for libvirt
24 config.vm.provider "libvirt" do |_, override|
25 override.vm.box = "generic/ubuntu2404"
26 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
29 # configure shared package cache if possible
30 if Vagrant.has_plugin?("vagrant-cachier")
31 config.cache.enable :apt
32 config.cache.scope = :box
35 # port forward for webrick on 3000
36 config.vm.network :forwarded_port, :guest => 3000, :host => 3000
38 # provision using a simple shell script
39 config.vm.provision :shell, :path => "script/vagrant/setup/provision.sh"