nextcloudpi/Vagrantfile
nachoparker c10d4bd8fb upgrade to NC21.0.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-12 16:55:46 -06:00

50 lines
1.1 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Vagrantfile for the NCP Debian VM
#
# Instructions: vagrant up; vagrant ssh
#
# Notes: User/Pass is ubnt/ubnt.
# $HOME is accessible as /external. CWD is accessible as /cwd
#
Vagrant.configure("2") do |config|
vmname = "NCP Debian VM"
release = ENV["DEB_RELEASE"]
config.vm.box = "debian/#{release}64"
config.vm.box_check_update = true
config.vm.hostname = "ncp-vm"
config.vm.synced_folder '.', '/vagrant', disabled: true
$script = <<-SHELL
sudo su
set -e
BRANCH=master
#BRANCH=devel # uncomment to install devel
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git
# install
git clone -b "$BRANCH" https://github.com/nextcloud/nextcloudpi.git /tmp/nextcloudpi
cd /tmp/nextcloudpi
source install.sh
# cleanup
source etc/library.sh
run_app_unsafe post-inst.sh
cd /
rm -r /tmp/nextcloudpi
systemctl disable sshd
poweroff
SHELL
# Provision the VM
config.vm.provision "shell", inline: $script
end