Added server configuration to documentation

This commit is contained in:
Noikoio 2018-03-28 23:50:15 -07:00
parent 5339701bef
commit 7e55acb5e6
2 changed files with 23 additions and 0 deletions

22
docs/database.md Normal file
View file

@ -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.

View file

@ -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.