mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
Tuneups of Vagrant
Increase memory allocation to 512MB so guest VM is not swapping. SSH forwarding, DNS host nat resolver. Don't use NFS on darwin, just use standard folder sharing.
This commit is contained in:
parent
43d4eb681e
commit
f54e530a3e
21
Vagrantfile
vendored
21
Vagrantfile
vendored
|
@ -1,14 +1,29 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
# See https://github.com/discourse/core/blob/master/DEVELOPMENT.md
|
||||
#
|
||||
Vagrant::Config.run do |config|
|
||||
config.vm.box = 'discourse-pre'
|
||||
config.vm.box_url = 'http://www.discourse.org/vms/discourse-pre.box'
|
||||
|
||||
# Make this VM reachable on the host network as well, so that other
|
||||
# VM's running other browsers can access our dev server.
|
||||
config.vm.network :hostonly, '192.168.10.200'
|
||||
|
||||
# Make it so that network access from the vagrant guest is able to
|
||||
# use SSH private keys that are present on the host without copying
|
||||
# them into the VM.
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
# This setting gives the VM 512MB of MEMORIES instead of the default 384.
|
||||
config.vm.customize ["modifyvm", :id, "--memory", 512]
|
||||
|
||||
# This setting makes it so that network access from inside the vagrant guest
|
||||
# is able to resolve DNS using the hosts VPN connection.
|
||||
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
|
||||
config.vm.forward_port 3000, 4000
|
||||
config.vm.forward_port 1080, 4080 # Mailcatcher
|
||||
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
|
||||
end
|
||||
config.vm.share_folder("v-root", "/vagrant", ".")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user