41 lines
1.4 KiB
Ruby
41 lines
1.4 KiB
Ruby
# encoding: utf-8
|
|
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "generic/debian10"
|
|
config.vm.box_check_update = false
|
|
|
|
config.vm.provider :virtualbox do |vb|
|
|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
|
vb.memory = 2048
|
|
vb.cpus = 4
|
|
end
|
|
|
|
config.vm.network "forwarded_port", guest: 8000, host: 8001, auto_correct: true
|
|
config.vm.network "forwarded_port", guest: 80, host: 81, auto_correct: true
|
|
|
|
config.vm.synced_folder ".", "/vagrant"
|
|
config.vm.provision "shell", privileged: true, path: "./provision.sh"
|
|
|
|
# Error:
|
|
# [default] GuestAdditions seems to be installed (5.1.38) correctly, but not running.
|
|
# @see solution from: https://github.com/dotless-de/vagrant-vbguest/issues/333#issuecomment-487105544
|
|
# if Vagrant.has_plugin?("vagrant-vbguest")
|
|
# config.vbguest.auto_update = false
|
|
# end
|
|
|
|
config.trigger.after :up do |trigger|
|
|
trigger.info = "Trigger: install dependencies on every up"
|
|
trigger.run_remote = {inline: <<-SHELL
|
|
chmod +x /vagrant/install-fonts.sh
|
|
runuser -l vagrant -c './vagrant/install-fonts.sh'
|
|
SHELL
|
|
} end
|
|
|
|
# Enable X11 forwarding for graphical apps.
|
|
# Make sure you have xquartz installed if using OSX host!
|
|
config.ssh.forward_agent = true
|
|
config.ssh.forward_x11 = true
|
|
end
|