forked from carlosazaustre/mean-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
68 lines (59 loc) · 2.05 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
57
58
59
60
61
62
63
64
65
66
67
68
# encoding: utf-8
# This file originally created at http://rove.io/2c31db58c88bc7e8477ec023d4960a4e
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.ssh.forward_agent = true
# Add port-forward for Express app
config.vm.network :forwarded_port, guest: 3000, host: 3000
# Add port-forward for Express app
config.vm.network :forwarded_port, guest: 8089, host: 8089
# Add port-forward for Livereload
config.vm.network :forwarded_port, guest: 35729, host: 35729
# Add port-forward for Nginx
config.vm.network :forwarded_port, guest: 80, host: 80
config.vm.network :private_network, ip: "192.168.3.10"
config.vm.hostname = "hbit.server.dev"
config.vm.synced_folder "/Users/alberto/Projects/hbit-server", "/var/www/hbit-server"
config.vm.synced_folder "/Users/alberto/Projects/hbit-crud-api", "/var/www/hbit-crud-api"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :apt
chef.add_recipe 'redis'
chef.add_recipe 'git'
chef.add_recipe 'nginx'
chef.add_recipe 'vim'
chef.add_recipe 'nodejs'
chef.add_recipe 'mongodb::default'
chef.json = {
:redis => {
:bind => "127.0.0.1",
:port => "6379",
:config_path => "/etc/redis/redis.conf",
:daemonize => "yes",
:timeout => "300",
:loglevel => "notice"
},
:git => {
:prefix => "/usr/local"
},
:nginx => {
:dir => "/etc/nginx",
:log_dir => "/var/log/nginx",
:binary => "/usr/sbin/nginx",
:user => "www-data",
:init_style => "runit",
:pid => "/var/run/nginx.pid",
:worker_connections => "1024"
},
:mongodb => {
:dbpath => "/var/lib/mongodb",
:logpath => "/var/log/mongodb",
:port => "27017"
}
}
end
# Install dependencies
config.vm.provision :shell, :path => "install.sh"
end