forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
supervisord-singularity.conf
69 lines (59 loc) · 2.83 KB
/
supervisord-singularity.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
[unix_http_server]
file = /tmp/supervisord/supervisor.sock
[supervisorctl]
serverurl = unix:///tmp/supervisord/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisord]
nodaemon=true
logfile=/tmp/cvat-supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=debug ; info, debug, warn, trace
pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
childlogdir=/tmp/ ; where child log files will live
[program:ssh-agent]
command=bash -c "rm /tmp/ssh-agent.sock -f && /usr/bin/ssh-agent -d -a /tmp/ssh-agent.sock"
priority=1
autorestart=true
[program:rqworker_default]
command=/home/django/wait-for-it.sh redis:6379 -t 0 -- bash -ic \
"exec /usr/bin/python3 /home/django/manage.py rqworker -v 3 default"
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"
numprocs=2
process_name=rqworker_default_%(process_num)s
[program:rqworker_low]
command=/home/django/wait-for-it.sh redis:6379 -t 0 -- bash -ic \
"exec /usr/bin/python3 /home/django/manage.py rqworker -v 3 low"
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"
numprocs=1
[program:git_status_updater]
command=/home/django/wait-for-it.sh redis:6379 -t 0 -- bash -ic \
"/usr/bin/python3 ~/manage.py update_git_states"
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"
numprocs=1
[program:rqscheduler]
command=/home/django/wait-for-it.sh redis:6379 -t 0 -- bash -ic \
"/usr/bin/python3 /usr/local/bin/rqscheduler --host redis -i 30"
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"
numprocs=1
[program:runserver]
; Here need to run a couple of commands to initialize DB and copy static files.
; We cannot initialize DB on build because the DB should be online. Also some
; apps are dynamically loaded by an environment variable. It can lead to issues
; with docker cache. Thus it is necessary to run collectstatic here for such
; apps.
;command=/home/django/wait-for-it.sh db:5432 -t 0 -- bash -ic \
; "/usr/bin/python3 ~/manage.py migrate && \
; /usr/bin/python3 ~/manage.py collectstatic --no-input && \
; exec /usr/bin/python3 /home/django/manage.py runmodwsgi --log-to-terminal --port 8080 \
; --limit-request-body 1073741824 --log-level INFO --include-file /home/django/mod_wsgi.conf \
; --locale %(ENV_LC_ALL)s"
;environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"
command=bash -ic \
"/usr/bin/python3 /home/django/manage.py migrate && \
/usr/bin/python3 /home/django/manage.py collectstatic --no-input && \
exec /usr/bin/python3 /home/django/manage.py runmodwsgi --log-to-terminal --port 8080 \
--limit-request-body 1073741824 --log-level INFO --include-file /home/django/mod_wsgi.conf \
--locale %(ENV_LC_ALL)s"
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock"