Document Docker restart policy

This commit is contained in:
Charlie Laabs
2022-01-09 17:42:13 -06:00
parent 2237d344b7
commit f9fbba204a
2 changed files with 4 additions and 3 deletions

View File

@@ -12,9 +12,10 @@ All notable changes to this project will be documented in this file.
* Config option `game` renamed to `activity` * Config option `game` renamed to `activity`
* Config option `role` renamed to `userRoleIds`. Changed from string to array of strings. * 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` * 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`. * 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. * 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 #### New Features

View File

@@ -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: 1. Open a command prompt and run:
```sh ```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: <https://claabs.github.io/markov-discord/classes/AppConfig.html> 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: <https://claabs.github.io/markov-discord/classes/AppConfig.html>
1. Run the container again and use the invite link printed to the logs. 1. Run the container again and use the invite link printed to the logs.