Document restart capabilities when running a PRE node via Docker or systemd.

pull/2945/head
derekpierre 2022-05-25 10:30:26 -04:00
parent 59aed8d350
commit de7fb6ad7b
1 changed files with 19 additions and 0 deletions

View File

@ -222,6 +222,7 @@ This step starts the PRE node.
$ docker run -d --rm \ $ docker run -d --rm \
--name ursula \ --name ursula \
--restart unless-stopped \
-v ~/.local/share/nucypher:/root/.local/share/nucypher \ -v ~/.local/share/nucypher:/root/.local/share/nucypher \
-v ~/.ethereum/:/root/.ethereum \ -v ~/.ethereum/:/root/.ethereum \
-p 9151:9151 \ -p 9151:9151 \
@ -230,6 +231,14 @@ This step starts the PRE node.
nucypher/nucypher:latest \ nucypher/nucypher:latest \
nucypher ursula run nucypher ursula run
.. note::
Setting the ``--restart`` parameter to ``unless-stopped`` ensures that the Docker
container will be automatically restarted if it exited, except if the container was
stopped using the ``docker stop`` command. See `Docker Restart Policies <https://docs.docker.com/engine/reference/run/#restart-policies---restart>`_
for more information.
View Node Logs View Node Logs
++++++++++++++ ++++++++++++++
@ -307,6 +316,7 @@ Create a file named ``ursula.service`` in ``/etc/systemd/system``, and add this
[Service] [Service]
User=<YOUR USERNAME> User=<YOUR USERNAME>
Type=simple Type=simple
Restart=on-failure
Environment="NUCYPHER_OPERATOR_ETH_PASSWORD=<YOUR OPERATOR ADDRESS PASSWORD>" Environment="NUCYPHER_OPERATOR_ETH_PASSWORD=<YOUR OPERATOR ADDRESS PASSWORD>"
Environment="NUCYPHER_KEYSTORE_PASSWORD=<YOUR PASSWORD>" Environment="NUCYPHER_KEYSTORE_PASSWORD=<YOUR PASSWORD>"
ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run
@ -324,6 +334,15 @@ Replace the following values with your own:
Run ``pipenv venv`` within the virtual environment to get the virtual environment path. Run ``pipenv venv`` within the virtual environment to get the virtual environment path.
.. note::
Setting the ``Restart`` option to ``on-failure``, ensures that the systemd service
will be automatically restarted if it exited with a non-zero exit code, except if
the container was stopped using the ``systemctl stop`` command. See
`Systemd Restart <https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=>`_
for more information.
Enable Node Service Enable Node Service
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~