From d446f8ddd121f0fa0d6431b33beeab9be1917df8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 1 Apr 2021 20:14:31 +1100 Subject: [PATCH] Add supervisor conf file specific to docker --- deploy/inventree.conf | 1 - docker/inventree.conf | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docker/inventree.conf diff --git a/deploy/inventree.conf b/deploy/inventree.conf index a55c7163f6..782b6ae2f6 100644 --- a/deploy/inventree.conf +++ b/deploy/inventree.conf @@ -13,7 +13,6 @@ [supervisord] ; Change this path if log files are stored elsewhere logfile=/home/inventree/log/supervisor.log -nodaemon=true [program:inventree-server] user=inventree diff --git a/docker/inventree.conf b/docker/inventree.conf new file mode 100644 index 0000000000..dabf9ddafb --- /dev/null +++ b/docker/inventree.conf @@ -0,0 +1,41 @@ +; # Supervisor Config File (for docker build) +; +; This config file is specific to the InvenTree docker build! +; +; There are two separate processes which must be managed: +; +; ## Web Server +; The InvenTree server must be launched and managed as a process +; The recommended way to handle the web server is to use gunicorn +; +; ## Background Tasks +; A background task manager processes long-running and periodic tasks +; InvenTree uses django-q for this purpose + +[supervisord] +; Change this path if log files are stored elsewhere +logfile=/home/inventree/log/supervisor.log +nodaemon=true + +[program:inventree-server] +user=inventree +directory=/home/inventree/src/InvenTree +command=/home/inventree/env/bin/gunicorn -c gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:%(INVENTREE_PORT)s +startsecs=10 +autostart=true +autorestart=true +startretries=3 +; Change these paths if log files are stored elsewhere +stderr_logfile=/home/inventree/log/server.err.log +stdout_logfile=/home/inventree/log/server.out.log + +[program:inventree-cluster] +user=inventree +directory=/home/inventree/src/InvenTree +command=/home/inventree/env/bin/python manage.py qcluster +startsecs=10 +autostart=true +autorestart=true +; Change these paths if log files are stored elsewhere +stderr_logfile=/home/inventree/log/cluster.err.log +stdout_logfile=/home/inventree/log/cluster.out.log \ No newline at end of file