add database config options to docs

This commit is contained in:
Izalia Mae 2024-03-13 18:37:00 -04:00
parent 9fe6d8ad96
commit 7f1c0d939d

View file

@ -1,15 +1,19 @@
# Configuration # Configuration
## General ## Config File
### Domain These options are stored in the configuration file (usually relay.yaml)
### General
#### Domain
Hostname the relay will be hosted on. Hostname the relay will be hosted on.
domain: relay.example.com domain: relay.example.com
### Listener #### Listener
The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc) The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc)
is running on the same host, it is recommended to change `listen` to `localhost` if the reverse is running on the same host, it is recommended to change `listen` to `localhost` if the reverse
@ -19,7 +23,7 @@ proxy is on the same host.
port: 8080 port: 8080
### Push Workers #### Push Workers
The number of processes to spawn for pushing messages to subscribed instances. Leave it at 0 to The number of processes to spawn for pushing messages to subscribed instances. Leave it at 0 to
automatically detect how many processes should be spawned. automatically detect how many processes should be spawned.
@ -27,21 +31,21 @@ automatically detect how many processes should be spawned.
workers: 0 workers: 0
### Database type #### Database type
SQL database backend to use. Valid values are `sqlite` or `postgres`. SQL database backend to use. Valid values are `sqlite` or `postgres`.
database_type: sqlite database_type: sqlite
### Cache type #### Cache type
Cache backend to use. Valid values are `database` or `redis` Cache backend to use. Valid values are `database` or `redis`
cache_type: database cache_type: database
### Sqlite File Path #### Sqlite File Path
Path to the sqlite database file. If the path is not absolute, it is relative to the config file. Path to the sqlite database file. If the path is not absolute, it is relative to the config file.
directory. directory.
@ -49,7 +53,7 @@ directory.
sqlite_path: relay.jsonld sqlite_path: relay.jsonld
## Postgresql ### Postgresql
In order to use the Postgresql backend, the user and database need to be created first. In order to use the Postgresql backend, the user and database need to be created first.
@ -57,80 +61,128 @@ In order to use the Postgresql backend, the user and database need to be created
sudo -u postgres psql -c "CREATE DATABASE activityrelay OWNER activityrelay" sudo -u postgres psql -c "CREATE DATABASE activityrelay OWNER activityrelay"
### Database Name #### Database Name
Name of the database to use. Name of the database to use.
name: activityrelay name: activityrelay
### Host #### Host
Hostname, IP address, or unix socket the server is hosted on. Hostname, IP address, or unix socket the server is hosted on.
host: /var/run/postgresql host: /var/run/postgresql
### Port #### Port
Port number the server is listening on. Port number the server is listening on.
port: 5432 port: 5432
### Username #### Username
User to use when logging into the server. User to use when logging into the server.
user: null user: null
### Password #### Password
Password for the specified user. Password for the specified user.
pass: null pass: null
## Redis ### Redis
### Host #### Host
Hostname, IP address, or unix socket the server is hosted on. Hostname, IP address, or unix socket the server is hosted on.
host: /var/run/postgresql host: /var/run/postgresql
### Port #### Port
Port number the server is listening on. Port number the server is listening on.
port: 5432 port: 5432
### Username #### Username
User to use when logging into the server. User to use when logging into the server.
user: null user: null
### Password #### Password
Password for the specified user. Password for the specified user.
pass: null pass: null
### Database Number #### Database Number
Number of the database to use. Number of the database to use.
database: 0 database: 0
### Prefix #### Prefix
Text to prefix every key with. It cannot contain a `:` character. Text to prefix every key with. It cannot contain a `:` character.
prefix: activityrelay prefix: activityrelay
## Database Config
These options are stored in the database and can be changed via CLI, API, or the web interface.
### Approval Required
When enabled, instances that try to follow the relay will have to be manually approved by an admin.
approval-required: false
### Log Level
Maximum level of messages to log.
Valid values: `DEBUG`, `VERBOSE`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
log-level: INFO
### Name
Name of your relay's instance. It will be displayed at the top of web pages and in API endpoints.
name: ActivityRelay
### Note
Short blurb that will be displayed on the relay's home and in API endpoints if set.
note: null
### Theme
Color theme to use for the web pages.
Valid values: `Default`, `Pink`, `Blue`
theme: Default
### Whitelist Enabled
When enabled, only instances on the whitelist can join. Any instances currently subscribed and not in the whitelist when this is enabled can still post.
whitelist-enabled: False