Update ConfigDB docs for new mix commands

This commit is contained in:
Mark Felder 2020-11-28 11:53:45 -06:00
parent 0847e3e496
commit 570a923a3b
1 changed files with 47 additions and 42 deletions

View File

@ -124,40 +124,45 @@ The configuration of Pleroma has traditionally been managed with a config file,
## Debugging ## Debugging
### Clearing database config ### Clearing database config
You can clear the database config by truncating the `config` table in the database. e.g., You can clear the database config with the following command:
``` **Source:**
psql -d pleroma_dev
pleroma_dev=# TRUNCATE config; ```
TRUNCATE TABLE $ mix pleroma.config reset
``` ```
or
**OTP:**
```
$ ./bin/pleroma_ctl config reset
```
Additionally, every time you migrate the configuration to the database the config table is automatically truncated to ensure a clean migration. Additionally, every time you migrate the configuration to the database the config table is automatically truncated to ensure a clean migration.
### Manually removing a setting ### Manually removing a setting
If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing AdminFE, you can manually remove the offending setting if you know which one it is. If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing AdminFE, you can manually remove the offending setting if you know which one it is.
e.g., here is an example showing a minimal configuration in the database. Only the `config :pleroma, :instance` settings are in the table: e.g., here is an example showing a the removal of the `config :pleroma, :instance` settings:
``` **Source:**
$ mix pleroma.config keylist
The following configuration keys are set in ConfigDB:
- instance ```
$ mix pleroma.config delete pleroma instance
Are you sure you want to continue? [n] y
config :pleroma, :instance deleted from the ConfigDB.
```
``` or
``` **OTP:**
$ mix pleroma.config show instance
config :pleroma, :instance, [name: "MyPleroma", description: "A fun place to hang out!", notify_email: "no-reply@mypleroma.com", email: "admin@mypleroma.com", account_activation_required: true]
``` ```
$ ./bin/pleroma_ctl config delete pleroma instance
To delete the saved settings for `:instance`: Are you sure you want to continue? [n] y
config :pleroma, :instance deleted from the ConfigDB.
``` ```
$ mix pleroma.config keydel instance
instance deleted from the ConfigDB.
```
Now the `config :pleroma, :instance` settings have been removed from the database. Now the `config :pleroma, :instance` settings have been removed from the database.