From f9fbba204aed3859d3a00155abaf0aa5ed76f14a Mon Sep 17 00:00:00 2001 From: Charlie Laabs Date: Sun, 9 Jan 2022 17:42:13 -0600 Subject: [PATCH] Document Docker restart policy --- CHANGELOG.md | 3 ++- README.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3062d4..86cd053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,10 @@ All notable changes to this project will be documented in this file. * Config option `game` renamed to `activity` * Config option `role` renamed to `userRoleIds`. Changed from string to array of strings. * Docker internal volume path moved from `/usr/src/markbot/config` to `/usr/app/config` -* Database changed from JSON files to a SQLite database. You'll need to retrain the bot to use it again. +* Database changed from JSON files to a SQLite database. You'll need to re-train the bot to use it again. * The bot must be explicitly granted permission to listen to a list of channels before using it. Configure it with `/listen`. * Docker user changed from `root` to `node`. You may need to update your mounted volume's permissions. +* pm2 has been removed from the Docker container. Make sure to add `--restart=unless-stopped` to your Docker run config to ensure the same resiliency. #### New Features diff --git a/README.md b/README.md index 0da1014..b64d0be 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ Running this bot in Docker is the easiest way to ensure it runs as expected and 1. Open a command prompt and run: ```sh - docker run --rm -ti -v /my/host/dir:/usr/app/config ghcr.io/claabs/markov-discord:latest + docker run --restart unless-stopped --rm -ti -v /my/host/dir:/usr/app/config ghcr.io/claabs/markov-discord:latest ``` - Where `/my/host/dir` is a accessible path on your system. + Where `/my/host/dir` is a accessible path on your system. `--restart=unless-stopped` is recommended in case an unexpected error crashes the bot. 1. The Docker container will create a default config file in your mounted volume (`/my/host/dir`). Open it and add your bot token. You may change any other values to your liking as well. Details for each configuration item can be found here: 1. Run the container again and use the invite link printed to the logs.