diff --git a/Cargo.lock b/Cargo.lock index bd7d62f..4489b3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,7 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chronicle-dicebot" -version = "0.3.0" +version = "0.4.0" dependencies = [ "async-trait", "dirs", diff --git a/Cargo.toml b/Cargo.toml index 706c1e4..ebca778 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chronicle-dicebot" -version = "0.3.0" +version = "0.4.0" authors = ["Taylor C. Richberger ", "projectmoon "] edition = "2018" license = 'MIT' diff --git a/README.md b/README.md index 7fb13bb..c655333 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ This is a fork of the [axfive-matrix-dicebot](https://gitlab.com/Taywee/axfive-matrix-dicebot) with basic support for the Chronicles of Darkness 2E Storytelling System, with future plans to extend the codebase further to support -variables and perhaps character sheet management. +variables and perhaps character sheet management. It also contains +various fixes, uses the Matrix SDK for connectivity, and has a Docker +image. ## Usage @@ -48,12 +50,9 @@ like this: ```ini [matrix] -home_server = 'matrix.org' - -[matrix.login] +home_server = https://'matrix.org' +username = 'thisismyusername' password = 'thisismypassword' -type = 'm.login.password' -user = 'axfive-dicebot' ``` Of course replacing all the necessary fields. Then you can run the @@ -64,6 +63,28 @@ You can also just run it on the command line with the `dicebot-cmd` command, which expects you to feed it one of the command expressions as shown above, and will give you the plaintext response. +## Docker Image + +The dice bot can run in a minimal Docker image based on [Void +Linux](https://voidlinux.org/). To create the Docker image, run +`docker build -t chronicle-dicebot .` in the root of the repository. + +A typical docker run command should look something like this: +``` +VERSION="0.3.0" +docker run --rm -d --name dicebot \ +-v /path/to/dicebot-config.toml:/config/dicebot-config.toml:ro \ +-v /path/to/cache//:/cache \ +chronicle-dicebot:$VERSION +``` + +The Docker image requires two volume mounts: the location of the +config file, which should be mounted at `/config/dicebot-config.toml`, +and a cache directory to store client state after initial sync. That +should be mounted at `/cache/`in the container. + +Properly automated docker builds are forthcoming. + ## Future plans The most basic plans are: @@ -72,4 +93,5 @@ The most basic plans are: a name to a value (`gnosis = 3`) and then using those in dice rolls. * Perhaps some sort of character sheet integration. But for that, we would need a sheet service. -* Robustness fixes if necessary, which will be sent upstream. +* Automation of Docker builds. +* Use environment variables instead of config file in Docker image.