]> git.openstreetmap.org Git - rails.git/blob - Vagrantfile
Increase poltergeist timeout
[rails.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
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/bionic64"
8     override.vm.synced_folder ".", "/srv/openstreetmap-website"
9     vb.customize ["modifyvm", :id, "--memory", "1024"]
10     vb.customize ["modifyvm", :id, "--cpus", "2"]
11     vb.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
12   end
13
14   # Use sshfs sharing if available, otherwise NFS sharing
15   sharing_type = Vagrant.has_plugin?("vagrant-sshfs") ? "sshfs" : "nfs"
16
17   # use third party image and sshfs or NFS sharing for lxc
18   config.vm.provider "lxc" do |_, override|
19     override.vm.box = "generic/ubuntu1804"
20     override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
21   end
22
23   # use third party image and sshfs or NFS sharing for libvirt
24   config.vm.provider "libvirt" do |_, override|
25     override.vm.box = "generic/ubuntu1804"
26     override.vm.synced_folder ".", "/srv/openstreetmap-website", :type => sharing_type
27   end
28
29   # configure shared package cache if possible
30   if Vagrant.has_plugin?("vagrant-cachier")
31     config.cache.enable :apt
32     config.cache.scope = :box
33   end
34
35   # port forward for webrick on 3000
36   config.vm.network :forwarded_port, :guest => 3000, :host => 3000
37
38   # provision using a simple shell script
39   config.vm.provision :shell, :path => "script/vagrant/setup/provision.sh"
40 end