1 # frozen_string_literal: true
6 Vagrant.configure("2") do |config|
7 # use official debian image
8 config.vm.box = "debian/bookworm64"
10 # configure virtualbox provider
11 config.vm.provider "virtualbox" do |vb, override|
12 override.vm.synced_folder ".", "/srv/openstreetmap-website"
13 vb.customize ["modifyvm", :id, "--memory", "4096"]
14 vb.customize ["modifyvm", :id, "--cpus", "2"]
15 vb.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
18 # Use sshfs sharing if available, otherwise NFS sharing
19 sharing_type = Vagrant.has_plugin?("vagrant-sshfs") ? "sshfs" : "nfs"
21 # configure lxc provider
22 config.vm.provider "lxc" do |_, override|
23 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
26 # configure libvirt provider
27 config.vm.provider "libvirt" do |libvirt, override|
28 override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
33 # configure shared package cache if possible
34 if Vagrant.has_plugin?("vagrant-cachier")
35 config.cache.enable :apt
36 config.cache.scope = :box
39 # port forward for webrick on 3000
40 config.vm.network :forwarded_port, :guest => 3000, :host => 3000
42 # provision using a simple shell script
43 config.vm.provision :shell, :path => "script/vagrant/setup/provision.sh"