4 Vagrant.configure("2") do |config|
5 # use official debian image
6 config.vm.box = "debian/bookworm64"
8 # configure virtualbox provider
9 config.vm.provider "virtualbox" do |vb, override|
10 override.vm.synced_folder ".", "/srv/openstreetmap-website"
11 vb.customize ["modifyvm", :id, "--memory", "4096"]
12 vb.customize ["modifyvm", :id, "--cpus", "2"]
13 vb.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
16 # Use sshfs sharing if available, otherwise NFS sharing
17 sharing_type = Vagrant.has_plugin?("vagrant-sshfs") ? "sshfs" : "nfs"
19 # configure lxc provider
20 config.vm.provider "lxc" do |_, override|
21 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
24 # configure libvirt provider
25 config.vm.provider "libvirt" do |libvirt, override|
26 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
31 # configure shared package cache if possible
32 if Vagrant.has_plugin?("vagrant-cachier")
33 config.cache.enable :apt
34 config.cache.scope = :box
37 # port forward for webrick on 3000
38 config.vm.network :forwarded_port, :guest => 3000, :host => 3000
40 # provision using a simple shell script
41 config.vm.provision :shell, :path => "script/vagrant/setup/provision.sh"