-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.cfg
More file actions
82 lines (63 loc) · 2.4 KB
/
Copy pathserver.cfg
File metadata and controls
82 lines (63 loc) · 2.4 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[buildout]
serverparts =
nginxconf
logrotateconf
solrconf
tomcat6conf
supervisor
[serverconfig]
# Settings for supervisor, nginx and so.
# Override these in your buildout.cfg
gunicorn-port = todo
supervisor-port = todo
sitename = todo
workers = 5
maxrequests = 500
[nginxconf]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/nginx.conf.in
output = ${buildout:directory}/etc/${serverconfig:sitename}.nginx.conf
[logrotateconf]
# Log rotation for django.log.
# access.log and error.log have their own global logrotation.
# Supervisor also has its own build-in log rotation.
recipe = collective.recipe.template
input = ${buildout:directory}/etc/logrotate.conf.in
output = ${buildout:directory}/etc/${serverconfig:sitename}.logrotate
[solrconf]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/solr/conf/solrcore.properties.in
output = ${buildout:directory}/etc/solr/conf/solrcore.properties
[tomcat6conf]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/solr.xml.in
output = ${buildout:directory}/etc/solr.xml
[collectstatic]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds = ${buildout:bin-directory}/django collectstatic --noinput
[supervisor]
recipe = collective.recipe.supervisor
port = ${serverconfig:supervisor-port}
user = sdfsdfsdf
password = aosdifsdf
stopasgroup = true
programs =
10 gunicorn ${buildout:bin-directory}/django [run_gunicorn --workers=${serverconfig:workers} --timeout 180 -b 127.0.0.1:${serverconfig:gunicorn-port} --preload --max-requests=${serverconfig:maxrequests}]
20 opendap (stopasgroup=true) /bin/sh [-c "DJANGO_SETTINGS_MODULE='${django:project}.${django:settings}' ${buildout:bin-directory}/gunicorn -b 127.0.0.1:${opendapconfig:opendap-port} --workers ${opendapconfig:workers} ddsc_opendap.handlers"]
[supervisor-cronjob]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord
[django-session-cleanup-cronjob]
# Cleans expired sessions from the database every night
# Note: "changed in Django 1.5: cleanup is deprecated. Use clearsessions instead."
# Note: ideally, should clean everything referencing the session_key as well
recipe = z3c.recipe.usercrontab
times = @daily
command = ${buildout:bin-directory}/django cleanup
[reindex-cronjob]
recipe = z3c.recipe.usercrontab
times = 15 * * * *
command = ${buildout:bin-directory}/django update_index --age=1