forked from poise/application_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecipes-packaginator.rb
More file actions
48 lines (43 loc) · 1.14 KB
/
recipes-packaginator.rb
File metadata and controls
48 lines (43 loc) · 1.14 KB
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
application "packaginator" do
path "/srv/packaginator"
owner "nobody"
group "nogroup"
repository "https://github.com/coderanger/packaginator.git"
revision "master"
migrate true
packages ["libpq-dev", "git-core", "mercurial"]
django do
packages ["redis"]
requirements "requirements/mkii.txt"
settings_template "settings.py.erb"
debug true
collectstatic "build_static --noinput"
database do
database "packaginator"
engine "postgresql_psycopg2"
username "packaginator"
password "awesome_password"
end
database_master_role "packaginator_database_master"
end
gunicorn do
only_if { node['roles'].include? 'packaginator_application_server' }
app_module :django
port 8080
end
celery do
only_if { node['roles'].include? 'packaginator_application_server' }
config "celery_settings.py"
django true
celerybeat true
celerycam true
broker do
transport "redis"
end
end
nginx_load_balancer do
only_if { node['roles'].include? 'packaginator_load_balancer' }
application_port 8080
static_files "/site_media" => "site_media"
end
end