forked from ScenicVerve/freelawmachine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.desktop
44 lines (37 loc) · 1.51 KB
/
Vagrantfile.desktop
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$git_script = <<SCRIPT
if [ ! -d /vagrant/ansible ]; then
git clone https://github.com/freelawproject/freelawmachine /vagrant/freelawmachine
echo "copying ansible directory to /vagrant"
cp -a /vagrant/freelawmachine/ansible /vagrant/ansible
fi
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "freelawproject/freelawbox64-desktop"
# Forwarding for CourtListener
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.network "forwarded_port", guest: 8081, host: 8081
# Forarding for Solr
config.vm.network "forwarded_port", guest: 8983, host: 8983
# Sets up the shared folder. If you already have CourtListener checked out
# somewhere else on your system, update the first argument to point to that
# clone of the repo.
config.vm.synced_folder "./courtlistener", "/var/www/courtlistener", create: true
# Tweak VM settings for virtualbox here. Feel free to bump up memory or
# CPU core count as desired, but the defaults should work fine.
config.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.memory = "4096"
vb.cpus = 2
end
# pull down the Asible playbooks if they aren't already
config.vm.provision "shell", inline: $git_script
# Use Ansible to set up CourtListener
config.vm.provision :ansible_local do |ansible|
ansible.provisioning_path = "/vagrant/ansible"
ansible.playbook = "freelawbox.yml"
ansible.limit = "all"
ansible.inventory_path = "/vagrant/ansible/config/hosts_local"
end
end