Add option to run supervisor as main process (#1270)

* Add option to run supervisor as main process

* use new option in test script
This commit is contained in:
Sascha Ißbrücker
2026-01-05 18:41:50 +01:00
committed by GitHub
parent 1b90db70c0
commit 184e4baa84
6 changed files with 62 additions and 7 deletions

View File

@@ -27,10 +27,14 @@ python manage.py migrate_tasks
# Ensure folders are owned by the right user
chown -R www-data: /etc/linkding/data
# Start background task processor using supervisord, unless explicitly disabled
if [ "$LD_DISABLE_BACKGROUND_TASKS" != "True" ]; then
supervisord -c supervisord.conf
# Start processes
# Experimental: use supervisor to manage all processes, enables logging background tasks to stdout/stderr
if [ "$LD_SUPERVISOR_MANAGED" = "True" ]; then
exec supervisord -c supervisord-all.conf
# Default: start background task processor as daemon, then uwsgi as main process
else
if [ "$LD_DISABLE_BACKGROUND_TASKS" != "True" ]; then
supervisord -c supervisord-tasks.conf
fi
exec uwsgi --http $LD_SERVER_HOST:$LD_SERVER_PORT uwsgi.ini
fi
# Start uwsgi server
exec uwsgi --http $LD_SERVER_HOST:$LD_SERVER_PORT uwsgi.ini