X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2Fadmin%2Fconfig.md;h=35e43b6a9d840a0b5d1409e09b9e3c0d39f9ddc1;hb=2c40c8b4a2890e60abe8d67a3c8af4a88d225b60;hp=41ca8fd5850187b300c945ce45dbef3df4eb94de;hpb=a9c7cd341be988686d6edc0f5461afffc9adaf02;p=akkoma diff --git a/docs/admin/config.md b/docs/admin/config.md index 41ca8fd58..35e43b6a9 100644 --- a/docs/admin/config.md +++ b/docs/admin/config.md @@ -8,14 +8,24 @@ config :pleroma, configurable_from_database: true ## How it works Settings are stored in database and are applied in `runtime` after each change. Most of the settings take effect immediately, except some, which need instance reboot. These settings are needed in `compile time`, that's why settings are duplicated to the file. -File with duplicated settings is located in `config/{env}.exported_from_db.exs`. For prod env it will be `config/prod.exported_from_db.exs`. +File with duplicated settings is located in `config/{env}.exported_from_db.exs` if pleroma is runned from source. For prod env it will be `config/prod.exported_from_db.exs`. + +For releases: `/etc/pleroma/prod.exported_from_db.secret.exs` or `PLEROMA_CONFIG_PATH/prod.exported_from_db.exs`. ## How to set it up -You need to migrate your existing settings to the database. You can do this with mix task (all config files will remain untouched): -```bash +You need to migrate your existing settings to the database. This task will migrate only added by user settings. +For example you add settings to `prod.secret.exs` file, only these settings will be migrated to database. For release it will be `/etc/pleroma/config.exs` or `PLEROMA_CONFIG_PATH`. +You can do this with mix task (all config files will remain untouched): + +```sh tab="OTP" + ./bin/pleroma_ctl config migrate_to_db +``` + +```sh tab="From Source" mix pleroma.config migrate_to_db ``` -Now you can change settings in admin interface. After each save, settings are duplicated to the `config/{env}.exported_from_db.exs` file. + +Now you can change settings in admin interface. After each save, settings from database are duplicated to the `config/{env}.exported_from_db.exs` file. **ATTENTION** @@ -25,13 +35,25 @@ Now you can change settings in admin interface. After each save, settings are du - all settings inside these keys: - `:hackney_pools` - `:chat` - - `Pleroma.Web.Endpoint` - partially settings inside these keys: - `:seconds_valid` in `Pleroma.Captcha` - `:proxy_remote` in `Pleroma.Upload` - `:upload_limit` in `:instance` -## How to remove it +## How to dump settings from database to file + +*Adding `-d` flag will delete migrated settings from database table.* + +```sh tab="OTP" + ./bin/pleroma_ctl config migrate_from_db [-d] +``` + +```sh tab="From Source" +mix pleroma.config migrate_from_db [-d] +``` + + +## How to completely remove it 1. Truncate or delete all values from `config` table ```sql