forked from Forum-Informationsfreiheit/OffenesParlament
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
47 lines (36 loc) · 1.6 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
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise32"
config.vm.synced_folder "offenesparlament", "/home/vagrant/offenesparlament"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
# python manage.py runserver 0.0.0.0:8000 default port
config.vm.network :forwarded_port, host: 8000, guest: 8000
# celery flower management interface default port
config.vm.network :forwarded_port, host: 5555, guest: 5555
# elasticsearch default port
config.vm.network :forwarded_port, host: 9200, guest: 9200
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 2
# improve network connectivity
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
config.vm.define 'offenesparlament' do |node|
node.vm.hostname = 'offenesparlament.vm'
node.vm.network :private_network, ip: '192.168.47.15'
##
# Provisioners
##
# 1. Bootstrap provisioner, installs the dev system and dependencies
config.vm.provision "bootstrap", type: "shell", path: "provision/bootstrap.sh", privileged: false
# 2. DB Creation and Reset provisioner
node.vm.provision "reset_db", type: "ansible_local", playbook: "provision/reset_postgresdb.yml"
#, verbose: "vvv"
# 3. DB Creation and Reset complete with Migrations provisioner
node.vm.provision "reset_db_mig", type: "ansible_local", playbook: "provision/reset_postgresdb_and_migrations.yml"
#, verbose: "vvv"
end
end