forked from nylas/sync-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
50 lines (39 loc) · 1.56 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
43
44
45
46
47
48
49
50
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Stripped-down Vagrantfile for development
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provider :vmware_fusion do |vmware, override|
override.vm.box = "precise64_fusion"
override.vm.box_url = "http://files.vagrantup.com/precise64_vmware_fusion.box"
vmware.vmx["memsize"] = "1024"
vmware.vmx["numvcpus"] = "2"
end
config.ssh.forward_agent = true
# config.vm.customize [
# 'modifyvm', :id,
# "--natdnshostresolver1", "on",
# "--natdnsproxy1", "on",
# "--memory", 1024
# ]
config.vm.provision :shell, :inline => "apt-get update -q && cd /vagrant && /bin/sh setup.sh"
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.network "forwarded_port", guest: 5555, host: 5555
config.vm.network "forwarded_port", guest: 30000, host:30000
# This will share any folder in the parent directory that
# has the name share-*
# It mounts it at the root without the 'share-' prefix
share_prefix = "share-"
Dir['../*/'].each do |fname|
basename = File.basename(fname)
if basename.start_with?(share_prefix)
mount_path = "/" + basename[share_prefix.length..-1]
puts "Mounting share for #{fname} at #{mount_path}"
config.vm.synced_folder fname, mount_path
end
end
end