Skip to content

Commit 73b2d6f

Browse files
jammureviltrout
authored andcommitted
Update the Vagrantfile to conform to the latest spec (v1.1).
1 parent 002fab3 commit 73b2d6f

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

Vagrantfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,33 @@
22
# vi: set ft=ruby :
33
# See https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md
44
#
5-
Vagrant::Config.run do |config|
5+
Vagrant.configure("2") do |config|
66
config.vm.box = 'discourse-pre'
77
config.vm.box_url = 'http://www.discourse.org/vms/discourse-pre.box'
88

99
# Make this VM reachable on the host network as well, so that other
1010
# 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"
1212

1313
# Make it so that network access from the vagrant guest is able to
1414
# use SSH private keys that are present on the host without copying
1515
# them into the VM.
1616
config.ssh.forward_agent = true
1717

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]
2021

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
2426

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
2729

2830
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
3032

3133
chef_cookbooks_path = ["chef/cookbooks"]
3234

0 commit comments

Comments
 (0)