forked from delftswa/delftswa.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
36 lines (25 loc) · 864 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'json'
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
vagrantConfigFile = "vagrantConfig.json"
if File.exists?(vagrantConfigFile)
userConfig = JSON.parse(File.read(vagrantConfigFile))
else
userConfig = {}
end
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider :virtualbox do |vb|
vb.name = "delftswa.github.io"
end
config.vm.network :forwarded_port, guest: 4000, host: 4000
memory = userConfig["memory"] || 1024
cpus = userConfig["cpus"] || 2
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", memory, "--cpus", cpus]
end
config.vm.hostname = "delftswa.github.io"
config.vm.provision :shell, :path => "provision.sh"
end