/
nodes.pp
45 lines (39 loc) · 931 Bytes
/
nodes.pp
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
node 'app' {
include stdlib
include nginx
include redis
include mongodb
include nodejs
include railsapp
nginx::resource::upstream { 'thin':
ensure => present,
members => [
'localhost:3000',
],
}
nginx::resource::upstream { 'faye':
ensure => present,
members => [
'localhost:9292',
],
}
nginx::resource::vhost { 'jieqoo.com':
ensure => present,
www_root => '/var/www/jieqoo.com/current/public',
listen_port => '80',
}
# Use a variable for thin
nginx::resource::location { 'jieqoo.com-thin':
ensure => present,
proxy => 'http://thin',
location => '@thin',
vhost => 'jieqoo.com',
}
nginx::resource::location { 'jieqoo.com-faye':
ensure => present,
proxy => 'http://faye',
location => '/faye',
vhost => 'jieqoo.com',
}
}
# ssh-keygen -t rsa -C "he9lin@youremail.com"