pi-rfid-jukebox/Vagrantfile
Annika Backstrom a6a9050afc Fix Vagrant dev environment
Adding the `-L` flag to nodemon, else it doesn't see our changes.
2019-12-14 18:59:32 -05:00

24 lines
807 B
Ruby

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network :private_network, ip: '10.76.91.201'
config.vm.hostname = "jukebox.pi"
# https://gist.github.com/millisami/3798773
def local_cache(box_name)
cache_dir = File.join(File.dirname(__FILE__), '.vagrant-cache', 'apt', box_name)
partial_dir = File.join(cache_dir, 'partial')
FileUtils.mkdir_p(partial_dir) unless File.exists? partial_dir
cache_dir
end
cache_dir = local_cache(config.vm.box)
config.vm.synced_folder cache_dir, "/var/cache/apt/archives"
config.vm.provision "shell", inline: "sudo apt-get update -y"
config.vm.provision "shell", inline: "sudo apt-get upgrade -y"
config.vm.provision "shell", inline: "sudo apt-get install -y make nodejs npm"
end
# vim:set ts=2 sw=2 et: