-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathVagrantfile
42 lines (31 loc) · 1.65 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
33
34
35
36
37
38
39
40
41
42
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
# Map Django's default port to 9000
config.vm.network "forwarded_port", guest: 9000, host: 9000
config.vm.network "forwarded_port", guest: 5432, host: 5432
config.vm.network :private_network, ip: '172.28.128.5'
config.vm.synced_folder ".", "/betterself", type: "nfs"
# Sync as NFS for speed (NFS doesn't work for PCs, but vagrant should default to something else)
# 1. to do NFS, need a private network
# 2. also use bridge to create a private network this allows you to have a postgres instance
config.vm.network "private_network", type: "dhcp", bridge: "en1: Wi-Fi (AirPort)"
# don't need this since this is not used to provision boxes
config.ssh.insert_key = false
config.ssh.forward_agent = true
# pandas takes a lot of memory to assemble
config.vm.provider "virtualbox" do |v|
# the fact that you can/need this much memory in pandas kinda scares me
v.memory = 4096
v.cpus = 2
end
# Copy a bash_profile config that can be customized
config.vm.provision "file", source: "config/development/vagrant/developer_aliases", destination: "~/.bash_profile"
# Provision scripts that install necessary requirements
config.vm.provision "shell", path: "config/development/vagrant/provision_bootstrap.sh"
# to deal with the unbelievable agony of trying to figure out why UTC was off by 14 minutes when it ended up being vagrant sleeping doesn't count time
config.vm.provider 'virtualbox' do |vb|
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
end
end