1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-24 08:46:24 -07:00

Use libvirt/KVM by default for vagrant

temporary workaround for #45
This commit is contained in:
Eggbertx 2020-09-07 17:09:09 -07:00
parent e375750e97
commit 5734ebf4de
2 changed files with 13 additions and 5 deletions

17
vagrant/Vagrantfile vendored
View file

@ -7,15 +7,22 @@ if DBTYPE != "mysql" && DBTYPE != "postgresql"
abort
end
puts "Using DBTYPE '#{DBTYPE}'"
PROVIDER = ENV.fetch("GC_PROVIDER", "libvirt") # because VirtualBox is crashing the host in Linux
BOX = "generic/ubuntu1604"
if PROVIDER == "virtualbox"
BOX = "ubuntu/xenial64"
end
Vagrant.configure("2") do |config|
config.ssh.username = "vagrant"
config.vm.box = "ubuntu/xenial64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.box = BOX
config.vm.network "forwarded_port", guest: 80, host: 80
config.vm.network :private_network, ip: "172.27.0.3"
config.vm.synced_folder "../", "/vagrant"
config.vm.provider "virtualbox" do |provider|
provider.gui = false
config.vm.provider PROVIDER do |provider|
if PROVIDER == "virtualbox"
provider.gui = false
end
provider.cpus = "4"
provider.memory = "4096"
end

View file

@ -8,6 +8,7 @@ if [ -z "$DBTYPE" ]; then
echo "DBTYPE environment variable not set, must be 'mysql' or 'postgresql' (sqlite3 no longer supported)"
exit 1
fi
echo "Using DBTYPE $DBTYPE"
add-apt-repository -y ppa:gophers/archive
apt-get -y update && apt-get -y upgrade