-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
supervisord.conf
245 lines (203 loc) · 9.89 KB
/
supervisord.conf
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
; - Command will be truncated if it looks like a config file comment, e.g.
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
;
; Warning:
; Paths throughout this example file use /tmp because it is available on most
; systems. You will likely need to change these to locations more appropriate
; for your system. Some systems periodically delete older files in /tmp.
; Notably, if the socket file defined in the [unix_http_server] section below
; is deleted, supervisorctl will be unable to connect to supervisord.
[unix_http_server]
file=/tmp/supervisor.sock ; the path to the socket file
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
; Security Warning:
; The inet HTTP server is not enabled by default. The inet HTTP server is
; enabled by uncommenting the [inet_http_server] section below. The inet
; HTTP server is intended for use within a trusted environment only. It
; should only be bound to localhost or only accessible from within an
; isolated, trusted network. The inet HTTP server does not support any
; form of encryption. The inet HTTP server does not use authentication
; by default (see the username= and password= options to add authentication).
; Never expose the inet HTTP server to the public internet.
;[inet_http_server] ; inet (TCP) server disabled by default
;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
;username=user ; default is no username (open server)
;password=123 ; default is no password (open server)
[supervisord]
logfile=/var/log/wp1bot/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
loglevel=debug ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false ; start in foreground if true; default false
minfds=1024 ; min. avail startup file descriptors; default 1024
minprocs=200 ; min. avail process descriptors;default 200
;umask=022 ; process file creation umask; default 022
;user=supervisord ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor ; supervisord identifier, default is 'supervisor'
;directory=/tmp ; default is not to cd during start
;nocleanup=true ; don't clean up tempfiles at start; default false
childlogdir=/tmp ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value" ; key value pairs to add to environment
;strip_ansi=false ; strip ansi escape codes in logs; def. false
; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
; The supervisorctl section configures how supervisorctl will connect to
; supervisord. configure it match the settings in either the unix_http_server
; or inet_http_server section.
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris ; should be same as in [*_http_server] if set
;password=123 ; should be same as in [*_http_server] if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history ; use readline history if available
[program:wp1-update]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis update
; process_num is required if you specify >1 numprocs
process_name=update-%(process_num)s
; If you want to run more than one worker instance, increase this
numprocs=8
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:wp1-upload]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis --queue-class rate_limit_queue.RateLimitQueue upload
; process_num is required if you specify >1 numprocs
process_name=upload-%(process_num)s
; If you want to run more than one worker instance, increase this
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:wp1-manual-update]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis manual-update
; process_num is required if you specify >1 numprocs
process_name=manual-update-%(process_num)s
; If you want to run more than one worker instance, increase this
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes =100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:wp1-manual-upload]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis --queue-class rate_limit_queue.RateLimitQueue manual-upload
; process_num is required if you specify >1 numprocs
process_name=manual-upload-%(process_num)s
; If you want to run more than one worker instance, increase this
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:wp1-materializer]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis --queue-class rate_limit_queue.RateLimitQueue materializer
; process_num is required if you specify >1 numprocs
process_name=materializer-%(process_num)s
; If you want to run more than one materializer worker, increase this
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:wp1-zimfile-polling]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rq worker -u redis://redis zimfile-polling
; process_num is required if you specify >1 numprocs
process_name=zimfile-polling-%(process_num)s
; If you want to run more than one zimfile-polling worker, increase this
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true
[program:scheduler]
; In the docker-compose world, the redis host is just 'redis'
command=/usr/local/bin/rqscheduler --host redis -i 20
; process_num is required if you specify >1 numprocs
process_name=scheduler-%(process_num)s
numprocs=1
; This is the directory from which RQ is run. Be sure to point this to the
; directory where your source code is importable from
directory=/usr/src/app
redirect_stderr=true
stdout_logfile=/var/log/wp1bot/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=5
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal=TERM
autostart=true
autorestart=true