-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
32 lines (25 loc) · 1.13 KB
/
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
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/xenial64'
config.vm.provider 'virtualbox' do |vb|
vb.name = 'jjh-ubuntu-vagrant'
vb.memory = 6144
vb.cpus = 4
# This greatly improves performance
vb.customize ['modifyvm', :id, '--ioapic', 'on']
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
# if host cpu resources ever get to be overtaxed by vagrant vm
# vb.customize ['modifyvm', :id, '--cpuexecutioncap', '50']
end
config.ssh.forward_agent = true
config.vm.network 'private_network', ip: '172.28.128.3' #strongly suggest this be in private address space
# Inject user files
['~/.gitconfig', '~/.tmux.conf', '~/.vimrc'].each do |file|
config.vm.provision :file, source: file, destination: file if File.exist?(File.expand_path(file))
end
config.vm.provision :shell, privileged: false, path: 'init-box.sh'
# Add desired port forwards here
config.vm.network 'forwarded_port', host: 5432, guest: 5432 #postgres
config.vm.network 'forwarded_port', host: 6379, guest: 6379 #redis
# Add desired file syncs here
end