/
init.pp
43 lines (35 loc) · 1.15 KB
/
init.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
class oppian {
$project = "oppianproj"
$debug_django = "True"
class { "webapp::python": owner => "root",
group => "wheel",
src_root => "/deploy",
nginx_workers => 1,
monit_admin => "matt@oppian.com",
monit_interval => 30,
}
webapp::python::instance { $project:
workers => inline_template("<%= (processorcount.to_i * 2 + 1) -%>"),
listen_port => 8080,
domain => "oppian.com",
django => true,
requirements => true,
django_syncdb => true,
mediaroot => "/deploy/$project/media",
mediaprefix => "/m",
pythonpath => ["lib/django", "apps", "apps/oppianapp/utils", "lib/django-storages"],
}
file { "/deploy/$project/settings_local.py":
ensure => file,
content => template('oppian/settings.py.erb'),
}
file { "/deploy/$project/media/admin":
ensure => link,
target => "/deploy/$project/lib/django/django/contrib/admin/media"
}
file { "/deploy/$project/media/favicon.ico":
ensure => link,
target => "/deploy/$project/media/images/favicon.ico"
}
class {'varnish':}
}