forked from LPgenerator/django-mmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
56 lines (44 loc) · 1.46 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
53
54
55
56
# -*- mode: ruby -*-
# Options {{{
#
APP_VM_NAME = "mmc"
APP_MEMORY = "1024"
APP_CPUS = "2"
#
# }}}
# Vagrant 2.0.x {{{
#
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.post_up_message = "Box URL is http://127.0.0.1:8000/admin/"
config.vm.provision :shell, :path => "demo/.vagrant_bootstrap.sh"
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.synced_folder "./demo/", "/mmc_demo", id: "vagrant-root"
# Set hostname
config.vm.hostname = APP_VM_NAME
# Configure network
config.vm.network :forwarded_port, guest: 8000, host: 8000
# SSH forward
config.ssh.forward_agent = true
# Configure VirtualBox
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.name = APP_VM_NAME
vb.customize ["modifyvm", :id, "--memory", APP_MEMORY]
vb.customize ["modifyvm", :id, "--name", APP_VM_NAME]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", APP_CPUS]
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
config.vm.network :private_network, ip: "44.44.44.46"
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
#
# }}}