This repository was archived by the owner on Jan 10, 2024. It is now read-only.
forked from pombredanne/flooding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.cfg
More file actions
59 lines (51 loc) · 2.09 KB
/
server.cfg
File metadata and controls
59 lines (51 loc) · 2.09 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
[buildout]
serverparts =
nginxconf
collectstatic
supervisor
rasterserverjson
[serverconfig]
# Settings for supervisor, nginx and so.
# Override these in your buildout.cfg
gunicorn-port = todo
supervisor-port = todo
rasterserver-port = 5000
sitename = todo
workers = 3
maxrequests = 500
[nginxconf]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/nginx.conf.in
output = ${buildout:directory}/etc/${serverconfig:sitename}.nginx.conf
[rasterserverjson]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/rasterserver.json.in
output = ${buildout:directory}/etc/rasterserver.json
[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
supervisord-environment=RASTER_SERVER_SETTINGS=${buildout:directory}/etc/rasterserver.json
programs =
10 gunicorn ${buildout:bin-directory}/django [run_gunicorn 127.0.0.1:${serverconfig:gunicorn-port} --workers=${serverconfig:workers} --timeout 600 --preload --max-requests=${serverconfig:maxrequests}]
20 cron_calculate_province_statistics_script (autostart=false autorestart=false startsecs=0) ${buildout:bin-directory}/django [calculate_province_statistics]
30 cron_create_province_excel_script (autostart=false autorestart=false startsecs=0) ${buildout:bin-directory}/django [create_ror_excel_files]
40 rasterserver ${buildout:bin-directory}/gunicorn [--bind=127.0.0.1:${serverconfig:rasterserver-port} raster_server.server:app]
[supervisor-cronjob]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord
[calculate_province_statistics_cronjob]
recipe = z3c.recipe.usercrontab
times = 1 6 * * *
command = ${buildout:bin-directory}/supervisorctl start cron_calculate_province_statistics_script
[create_province_excel_script]
recipe = z3c.recipe.usercrontab
times = 30 6 * * *
command = ${buildout:bin-directory}/supervisorctl start cron_create_province_excel_script