rattail-manual/docs/base/supervisor/setup.rst

60 lines
1.1 KiB
ReStructuredText
Raw Normal View History

.. highlight:: sh
=======
Setup
=======
Basic install of Supervisor itself::
sudo apt install supervisor
Adding a Process [Group]
========================
TODO
User Access
===========
By default only the ``root`` user can control Supervisor, e.g.::
sudo supervisorctl status
TODO: describe how to give e.g. ``rattail`` user access as well
Configuring XML-RPC
===================
Supervisor can provide a XML-RPC interface, with which Rattail can
communicate "directly" instead of invoking shell commands.
To enable this interface, create a file at
e.g. ``/etc/supervisor/conf.d/supervisor.conf`` and in it put:
.. code-block:: ini
[inet_http_server]
port = 127.0.0.1:8127
username = myuser
password = mypass
Choose whichever credentials you like for the above; use the same ones
in the remaining steps.
Once the above file is in place, restart::
sudo systemctl restart supervisor
Now within your Rattail config, set the Supervisor URL:
.. code-block:: ini
[rattail]
supervisorctl_url = http://myuser:mypass@localhost:8127/RPC2
You may need to restart the Rattail app(s) as well.