1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-23 19:55:03 +01:00

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

View File

@ -124,12 +124,20 @@ The configuration of Pleroma has traditionally been managed with a config file,
## Debugging
### 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.
@ -137,27 +145,24 @@ Additionally, every time you migrate the configuration to the database the confi
### 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.
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.
```
```
$ 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]
or
**OTP:**
```
To delete the saved settings for `:instance`:
```
$ mix pleroma.config keydel instance
instance deleted from the ConfigDB.
$ ./bin/pleroma_ctl config delete pleroma instance
Are you sure you want to continue? [n] y
config :pleroma, :instance deleted from the ConfigDB.
```
Now the `config :pleroma, :instance` settings have been removed from the database.