-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
31 lines (26 loc) · 1.16 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
Vagrant.configure("2") do |config|
# Configure the box to use
config.vm.box = 'ubuntu/trusty64'
# If you can only use a 32-bit operating system, Comment line 3 and uncomment lines 5
# config.vm.box = 'ubuntu/trusty32'
# Configure the network interfaces
config.vm.network :private_network, ip: "10.10.10.10"
# default rails server port
config.vm.network :forwarded_port, guest: 3000, host: 3000
# Default postgresql port
config.vm.network :forwarded_port, guest: 5432, host: 5432
# Configure shared folders
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", :nfs => true
config.vm.synced_folder "./application", "/var/www", id: "application", :nfs => true
# Configure VirtualBox environment
config.vm.provider :virtualbox do |v|
# If you get issues running the logged in commands, uncomment the following line:
# v.gui = true
v.name = (0...8).map { (65 + rand(26)).chr }.join
v.customize [ "modifyvm", :id, "--memory", 512 ]
end
# Provision the box
config.vm.provision :ansible do |ansible|
ansible.playbook = "ansible/site.yml"
end
end