forked from GeotrekCE/Geotrek-admin
/
buildout-prod.cfg
153 lines (136 loc) · 5.29 KB
/
buildout-prod.cfg
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[buildout]
extends =
buildout.cfg
parts +=
nginx-conf
gunicorn
gunicorn-app-conf
gunicorn-api-conf
tilecache-conf
gunicorn-tilecache-conf
convertit-conf
gunicorn-convertit-conf
logrotate-conf
logrotate-daily
supervisor
supervisor-conf
eggs +=
convertit
gunicorn
tilecache
Paste
[django]
eggs +=
python-memcached
[mkdirs]
paths += ${django:staticroot}
${django:deployroot}/var/log/
${django:deployroot}/var/tmp/
${tilecache-conf:cachedir}
${django:deployroot}/etc/init
${convertit-conf:download_dir}
${convertit-conf:converted_dir}
[gunicorn]
recipe = zc.recipe.egg
scripts = gunicorn_django
gunicorn_paster
gunicorn
eggs = ${buildout:eggs}
PasteDeploy
entry-points = gunicorn_django=gunicorn.app.djangoapp:run
[gunicorn-app-conf]
recipe = collective.recipe.genshi
workers = 4
timeout = 30
bind = unix:${django:deployroot}/var/run/gunicorn-${django:project}.sock
pidfile = ${django:deployroot}/var/run/gunicorn-${django:project}.pid
errorlog = ${django:deployroot}/var/log/${django:project}.log
input = ${buildout:directory}/conf/gunicorn.conf.in
output = ${django:deployroot}/etc/gunicorn-${django:project}.conf
[gunicorn-api-conf]
recipe = collective.recipe.genshi
workers = 4
timeout = 300
bind = unix:${django:deployroot}/var/run/gunicorn-${django:project}_api.sock
pidfile = ${django:deployroot}/var/run/gunicorn-${django:project}_api.pid
errorlog = ${django:deployroot}/var/log/${django:project}.log
input = ${buildout:directory}/conf/gunicorn.conf.in
output = ${django:deployroot}/etc/gunicorn-${django:project}_api.conf
[gunicorn-tilecache-conf]
recipe = collective.recipe.genshi
workers = 6
timeout = 10
bind = unix:${django:deployroot}/var/run/gunicorn-tilecache.sock
pidfile = ${django:deployroot}/var/run/gunicorn-tilecache.pid
errorlog = ${django:deployroot}/var/log/tilecache.log
input = ${buildout:directory}/conf/gunicorn.conf.in
output = ${django:deployroot}/etc/gunicorn-tilecache.conf
[tilecache-conf]
recipe = collective.recipe.genshi
cachedir = ${django:deployroot}/var/tiles
input = ${buildout:directory}/conf/tilecache.cfg.in
output = ${django:deployroot}/etc/tilecache.cfg
[gunicorn-convertit-conf]
recipe = collective.recipe.genshi
workers = 4
timeout = 30
bind = unix:${django:deployroot}/var/run/gunicorn-convertit.sock
pidfile = ${django:deployroot}/var/run/gunicorn-convertit.pid
errorlog = ${django:deployroot}/var/log/convertit.log
input = ${buildout:directory}/conf/gunicorn.conf.in
output = ${django:deployroot}/etc/gunicorn-convertit.conf
[convertit-conf]
recipe = collective.recipe.genshi
download_dir = ${django:mediaroot}/convertit/download
converted_dir = ${django:mediaroot}/convertit/converted
host = 0.0.0.0
port = 8001
input = ${buildout:directory}/conf/convertit.cfg.in
output = ${django:deployroot}/etc/convertit.cfg
[nginx-conf]
recipe = collective.recipe.genshi
port = 80
input = ${buildout:directory}/conf/nginx.conf.in
output = ${django:deployroot}/etc/nginx.conf
expiretime = 1d
cache = False
cachename = one
cachetime = 1d
errorlog = ${django:deployroot}/var/log/nginx-error.log
accesslog = ${django:deployroot}/var/log/nginx-access.log
[logrotate-conf]
recipe = collective.recipe.genshi
input = ${buildout:directory}/conf/logrotate.conf.in
output = ${django:deployroot}/etc/logrotate.conf
[logrotate-daily]
recipe = z3c.recipe.usercrontab
times = 0 6 * * *
command = /usr/sbin/logrotate --state ${django:deployroot}/var/run/logrotate.status ${django:deployroot}/etc/logrotate.conf
[supervisor]
recipe = collective.recipe.supervisor
supervisord-conf = ${django:deployroot}/etc/supervisord.conf
pidfile = ${django:deployroot}/var/run/supervisord.pid
logfile = ${django:deployroot}/var/log/supervisord.log
childlogdir = ${django:deployroot}/var/log
nodaemon = true
programs =
# Priority means order of start/shutdown
20 ${django:project} (stdout_logfile=${django:deployroot}/var/log/${django:project}.log stderr_logfile=${django:deployroot}/var/log/${django:project}.log) ${django:deployroot}/bin/django [run_gunicorn --config=${gunicorn-app-conf:output}] ${django:deployroot}/etc true
20 ${django:project}_api (stdout_logfile=${django:deployroot}/var/log/${django:project}.log stderr_logfile=${django:deployroot}/var/log/${django:project}.log) ${django:deployroot}/bin/django [run_gunicorn --config=${gunicorn-api-conf:output}] ${django:deployroot}/etc true
30 tilecache (stdout_logfile=${django:deployroot}/var/log/tilecache.log stderr_logfile=${django:deployroot}/var/log/tilecache.log) ${django:deployroot}/bin/gunicorn [-c ${gunicorn-tilecache-conf:output} TileCache:wsgiApp] ${django:deployroot}/etc true
40 convertit (stdout_logfile=${django:deployroot}/var/log/convertit.log stderr_logfile=${django:deployroot}/var/log/convertit.log) ${django:deployroot}/bin/gunicorn_paster [-c ${gunicorn-convertit-conf:output} ${convertit-conf:output}] ${django:deployroot}/etc true
[supervisor-conf]
recipe = collective.recipe.genshi
input = ${buildout:directory}/conf/supervisor.conf.in
output = ${django:deployroot}/etc/init/supervisor.conf
[versions]
collective.recipe.supervisor = 0.18
collective.recipe.genshi = 1.0
collective.recipe.template = 1.9
Genshi = 0.6
supervisor = 3.0a12
meld3 = 0.6.8
gunicorn = 0.17.4
z3c.recipe.usercrontab = 1.1
tilecache = 2.11
python-memcached = 1.51