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