You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
[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=%(ENV_HOME)s/logs/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=%(ENV_HOME)s/logs/ ; where child log files will live
|
|
|
|
[program:clamav_update]
|
|
command=bash -c "if [ \"${CLAM_AV}\" = 'yes' ]; then /usr/bin/freshclam -d \
|
|
-l %(ENV_HOME)s/logs/freshclam.log --foreground=true; fi"
|
|
|
|
[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=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_POSTGRES_HOST)s:5432 -t 0 -- bash -ic \
|
|
"rm -f /tmp/cvat-server/httpd.pid && python3 ~/manage.py migrate && \
|
|
python3 ~/manage.py collectstatic --no-input && \
|
|
exec python3 $HOME/manage.py runmodwsgi --log-to-terminal --port 8080 \
|
|
--limit-request-body 1073741824 --log-level INFO --include-file ~/mod_wsgi.conf \
|
|
%(ENV_DJANGO_MODWSGI_EXTRA_ARGS)s --locale %(ENV_LC_ALL)s \
|
|
--server-root /tmp/cvat-server"
|
|
numprocs=%(ENV_NUMPROCS)s
|