|
2 | 2 | # vi: set ft=ruby : |
3 | 3 | # See https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md |
4 | 4 | # |
5 | | -Vagrant::Config.run do |config| |
| 5 | +Vagrant.configure("2") do |config| |
6 | 6 | config.vm.box = 'discourse-pre' |
7 | 7 | config.vm.box_url = 'http://www.discourse.org/vms/discourse-pre.box' |
8 | 8 |
|
9 | 9 | # Make this VM reachable on the host network as well, so that other |
10 | 10 | # VM's running other browsers can access our dev server. |
11 | | - config.vm.network :hostonly, '192.168.10.200' |
| 11 | + config.vm.network :private_network, ip: "192.168.10.200" |
12 | 12 |
|
13 | 13 | # Make it so that network access from the vagrant guest is able to |
14 | 14 | # use SSH private keys that are present on the host without copying |
15 | 15 | # them into the VM. |
16 | 16 | config.ssh.forward_agent = true |
17 | 17 |
|
18 | | - # This setting gives the VM 1024MB of MEMORIES instead of the default 384. |
19 | | - config.vm.customize ["modifyvm", :id, "--memory", 1024] |
| 18 | + config.vm.provider :virtualbox do |v| |
| 19 | + # This setting gives the VM 1024MB of MEMORIES instead of the default 384. |
| 20 | + v.customize ["modifyvm", :id, "--memory", 1024] |
20 | 21 |
|
21 | | - # This setting makes it so that network access from inside the vagrant guest |
22 | | - # is able to resolve DNS using the hosts VPN connection. |
23 | | - config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |
| 22 | + # This setting makes it so that network access from inside the vagrant guest |
| 23 | + # is able to resolve DNS using the hosts VPN connection. |
| 24 | + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |
| 25 | + end |
24 | 26 |
|
25 | | - config.vm.forward_port 3000, 4000 |
26 | | - config.vm.forward_port 1080, 4080 # Mailcatcher |
| 27 | + config.vm.network :forwarded_port, guest: 3000, host: 4000 |
| 28 | + config.vm.network :forwarded_port, guest: 1080, host: 4080 # Mailcatcher |
27 | 29 |
|
28 | 30 | nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ |
29 | | - config.vm.share_folder("v-root", "/vagrant", ".", :nfs => nfs_setting) |
| 31 | + config.vm.synced_folder ".", "/vagrant", :nfs => nfs_setting |
30 | 32 |
|
31 | 33 | chef_cookbooks_path = ["chef/cookbooks"] |
32 | 34 |
|
|
0 commit comments