From 283663633aa3341f8fad44a4a0cfa864a32d8980 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Mar 2021 21:52:36 +1100 Subject: [PATCH] First pass at a supervisor.conf file --- deploy/inventree.conf | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 deploy/inventree.conf diff --git a/deploy/inventree.conf b/deploy/inventree.conf new file mode 100644 index 0000000000..5893b19e67 --- /dev/null +++ b/deploy/inventree.conf @@ -0,0 +1,31 @@ +; # Supervisor Config File +; Example configuration file for running InvenTree using supervisor +; 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] +environment=INVENTREE_SRC_DIR="/mnt/c/inventree/InvenTree", INVENTREE_BIN_DIR="/mnt/c/inventree/InvenTree" + +[program:inventree-server] +directory=/mnt/c/inventree/InvenTree +command=/mnt/c/inventree/inventree-env/bin/gunicorn -c gunicorn.conf.py InvenTree.wsgi +autostart=true +autorestart=true +startretries=3 +stderr_logfile=/var/log/inventree/server.err.log +stdout_logfile=/var/log/inventree/server.out.log + +[program:inventree-cluster] +directory=/mnt/c/inventree/InvenTree +command=/mnt/c/inventree/inventree-env/bin/python manage.py qcluster +autostart=true +autorestart=true +stderr_logfile=/var/log/inventree/cluster.err.log +stdout_logfile=/var/log/inventree/cluster.out.log