From d5fbc0b01cf73f54bfb26b8839fd8f27ea412254 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Wed, 19 May 2021 19:20:59 +0200 Subject: [PATCH] Remove PM2 guide (#4991) There's apparently no way to specify exit codes for which the process should not be restarted. This just shows how poor of a process manager PM2 is so we really should not continue to recommend it in the documentation... Ref: https://stackoverflow.com/questions/43614017/how-to-only-restart-node-process-with-pm2-if-exit-code-0 --- docs/autostart_pm2.rst | 56 ------------------------------------------ docs/index.rst | 1 - 2 files changed, 57 deletions(-) delete mode 100644 docs/autostart_pm2.rst diff --git a/docs/autostart_pm2.rst b/docs/autostart_pm2.rst deleted file mode 100644 index dfff258c4..000000000 --- a/docs/autostart_pm2.rst +++ /dev/null @@ -1,56 +0,0 @@ -.. pm2 service guide - -============================================== -Setting up auto-restart using pm2 on Linux -============================================== - -.. note:: This guide is for setting up PM2 on a Linux environment. This guide assumes that you already have a working Red instance. - --------------- -Installing PM2 --------------- - -Start by installing Node.JS and NPM via your favorite package distributor. From there run the following command: - -.. prompt:: bash - - npm install pm2 -g - -After PM2 is installed, run the following command to enable your Red instance to be managed by PM2. Replace the brackets with the required information. -You can add additional Red based arguments after the instance name, such as :code:`--dev`. - -.. prompt:: bash - - pm2 start "" --name "" -- -O -m redbot --no-prompt - -**Arguments to replace** - -- ```` - A name to identify the bot within pm2, this is not your Red instance. - -- | ```` - The location of your Python interpreter. - | To find out where that is, use the proper set of commands: - - .. prompt:: bash - :prompts: $,(redenv) $ - :modifiers: auto - - # If redbot is installed in a venv - $ source ~/redenv/bin/activate - (redenv) $ which python - - # If redbot is installed in a pyenv virtualenv - $ pyenv shell - (redenv) $ pyenv which python - -- ```` - The name of your Red instance. - ------------------------------- -Ensuring that PM2 stays online ------------------------------- - -To make sure that PM2 stays online and persistence between machine restarts, run the following commands: - -.. prompt:: bash - - pm2 save - pm2 startup diff --git a/docs/index.rst b/docs/index.rst index f51016257..ecf85e9c5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,7 +19,6 @@ Welcome to Red - Discord Bot's documentation! about_venv autostart_systemd autostart_mac - autostart_pm2 .. toctree:: :maxdepth: 2