forked from DoSomethingArchive/legacy-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
53 lines (40 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
43
44
45
46
47
48
49
50
51
52
Vagrant.configure("2") do |config|
## Choose your base box
config.vm.box = "dosomething/phoenix"
config.vm.box_version = "1.0.5"
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 3072]
# Fixes slow DNS on virtual Ubuntu 14.04.
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# Use custom created user to manage vagrant.
config.ssh.username = 'dosomething'
# Since authorized keys were prepopulated, vagrant needs a path to your key.
config.ssh.private_key_path = '~/.ssh/id_rsa'
# SSH Agent forwarding
config.ssh.forward_agent = true
# Mount shared folders
if ENV['DS_VAGRANT_MOUNT_NFS']
# NFS
config.vm.network :private_network, ip: "10.11.12.13"
config.vm.synced_folder ".", "/var/www/dev.dosomething.org", type: "nfs"
else
# SSHFS -- reverse mount from within Vagrant box
config.sshfs.paths = { "/var/www/dev.dosomething.org" => "../dosomething-mount" }
end
# Allow `npm link` for Neue
if File.exists?("/usr/local/lib/node_modules/@dosomething/forge")
config.vm.synced_folder "/usr/local/lib/node_modules/@dosomething/forge",
"/usr/local/lib/node_modules/@dosomething/forge",
owner: "www-data", group: "www-data"
end
# Http and https.
config.vm.network :forwarded_port, guest: 80, host: 8888
config.vm.network :forwarded_port, guest: 443, host: 8889
config.vm.host_name = "dev.dosomething.org"
# With Varnish
config.vm.network :forwarded_port, guest: 6081, host: 9999
# Solr.
config.vm.network :forwarded_port, guest: 8983, host: 8983
config.vm.provision :shell, :inline => 'more /vagrant/scripts/install_complete.txt'
end