1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/conf/runit/webvirtcloud-worker.sh
catborise 5d90d3fcf9 fix(docker): gunicorn's and the job worker's output go to docker logs
They went to files in the container that were never rotated and were lost
on each recreate. docker logs is rotated (10 MB x 5) and outlives a
restart.
2026-11-05 14:47:37 +03:00

7 lines
384 B
Bash
Executable file

#!/bin/sh
# The job worker (one per installation). runit stops it with TERM; it drains
# running jobs for 60 s and exits by itself.
cd /srv/webvirtcloud || exit
export WEBVIRTCLOUD_LOG_FILE=/srv/webvirtcloud/data/webvirtcloud-worker.log
# its output goes to the container's output (docker logs)
exec /sbin/setuser www-data /srv/webvirtcloud/venv/bin/python3 manage.py run_worker 2>&1