From 7e55acb5e6f8095aa107eb1893d077db21eb3a45 Mon Sep 17 00:00:00 2001 From: Noikoio Date: Wed, 28 Mar 2018 23:50:15 -0700 Subject: [PATCH] Added server configuration to documentation --- docs/database.md | 22 ++++++++++++++++++++++ docs/docs.md | 1 + 2 files changed, 23 insertions(+) create mode 100644 docs/database.md diff --git a/docs/database.md b/docs/database.md new file mode 100644 index 0000000..73ae587 --- /dev/null +++ b/docs/database.md @@ -0,0 +1,22 @@ +## Database settings + +RegexBot can make use of PostgreSQL to store certain information. Some components such as ModLogs requires database configuration to be present to function. Many other components make use of the database for caching of usernames. + +Sample within [configuration](docs.html): +``` +"database": { + "database": "rbproduction", + "username": "regexbot", + "password": "a good password should go here" +} +``` +### Values +The following values are accepted within the database object: +* hostname (*string*) - IP or hostname for establishing a connection. Defaults to localhost. +* database (*string*) - Name of database to use. +* username (*string*) - Name of PostgreSQL role (user). +* password (*string*) - Password value for the given PostgreSQL role. Only password authentication is supported. +Excluding `hostname`, all values are **required**. + +### Remarks +RegexBot assumes that the PostgreSQL role it uses has full access to the given database. It will create all tables, indexes, etc. automatically on load. Should the SQL server go down during bot operation, the bot must be restarted. \ No newline at end of file diff --git a/docs/docs.md b/docs/docs.md index 8d4ff0b..dde6abd 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -23,4 +23,5 @@ Value names are **case sensitive**. Keep this in mind, as case is not consistent * bot-token (*string*) - Discord token for connecting to the service. **Required.** * playing (*string*) - Optional text to display for the bot's status message. +* database (*object*) - Holds optional [database configuration](database.html). * servers (*array*) - Takes an array of unnamed [server definition](serverdef.html) objects. \ No newline at end of file