-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
41 lines (32 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
32
33
34
35
36
37
38
39
40
41
# Caracal Site - Development Environment
#
# Copyright © 2014. Way2CU. All Rights Reserved.
# Author: Mladen Mijatov
Vagrant.configure('2') do |config|
config.vm.box = 'hashicorp/precise32'
# customize virtual machine
config.vm.provider 'virtualbox' do |vm|
# name our machine for easier management
path = File.dirname(__FILE__)
name = File.basename(path)
if name == 'Site' or name == 'Web'
vm.name = File.basename(File.dirname(path))
else
vm.name = name
end
# configure virtualization options
vm.customize [ "modifyvm", :id, "--paravirtprovider", "kvm" ]
# configure virtual machine resources
vm.memory = 256
vm.cpus = 1
end
# install web server and required components
config.vm.provision :shell, :path => 'provision.sh', keep_color: true, run:'once'
# make sure caracal is up to date
config.vm.provision :shell, :inline => 'cd /var/www; git pull origin', keep_color: true, run:'always'
# configure shared directories
config.vm.synced_folder 'site', '/vagrant', owner: 'www-data', group: 'www-data'
# configure network
config.vm.network :forwarded_port, host:8080, guest:80
config.vm.network :forwarded_port, host:8085, guest:8080
end