OTP users need Pleroma running to execute pleroma_ctl, so reorganize instructions.
This commit is contained in:
parent
873ff5ce14
commit
cfc6484c40
|
@ -5,13 +5,7 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
|
|
||||||
## Migration to database config
|
## Migration to database config
|
||||||
|
|
||||||
1. Stop your Pleroma instance and edit your Pleroma config to enable database configuration:
|
1. Run the mix task to migrate to the database. You'll receive some debugging output and a few messages informing you of what happened.
|
||||||
|
|
||||||
```
|
|
||||||
config :pleroma, configurable_from_database: true
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Run the mix task to migrate to the database. You'll receive some debugging output and a few messages informing you of what happened.
|
|
||||||
|
|
||||||
**Source:**
|
**Source:**
|
||||||
|
|
||||||
|
@ -23,6 +17,8 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
|
|
||||||
**OTP:**
|
**OTP:**
|
||||||
|
|
||||||
|
*Note: OTP users need Pleroma to be running for `pleroma_ctl` commands to work*
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./bin/pleroma_ctl config migrate_to_db
|
$ ./bin/pleroma_ctl config migrate_to_db
|
||||||
```
|
```
|
||||||
|
@ -47,14 +43,20 @@ INSERT INTO "config" ("group","key","value","inserted_at","updated_at") VALUES (
|
||||||
Settings for group :pleroma migrated.
|
Settings for group :pleroma migrated.
|
||||||
```
|
```
|
||||||
|
|
||||||
3. It is recommended to backup your config file now.
|
2. It is recommended to backup your config file now.
|
||||||
```
|
```
|
||||||
cp config/dev.secret.exs config/dev.secret.exs.orig
|
cp config/dev.secret.exs config/dev.secret.exs.orig
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Now you can edit your config file and strip it down to the only settings which are not possible to control in the database. e.g., the Postgres and webserver (Endpoint) settings cannot be controlled in the database because the application needs the settings to start up and access the database.
|
3. Edit your Pleroma config to enable database configuration:
|
||||||
|
|
||||||
⚠️ **THIS IS NOT REQUIRED**
|
```
|
||||||
|
config :pleroma, configurable_from_database: true
|
||||||
|
```
|
||||||
|
|
||||||
|
4. ⚠️ **THIS IS NOT REQUIRED** ⚠️
|
||||||
|
|
||||||
|
Now you can edit your config file and strip it down to the only settings which are not possible to control in the database. e.g., the Postgres (Repo) and webserver (Endpoint) settings cannot be controlled in the database because the application needs the settings to start up and access the database.
|
||||||
|
|
||||||
Any settings in the database will override those in the config file, but you may find it less confusing if the setting is only declared in one place.
|
Any settings in the database will override those in the config file, but you may find it less confusing if the setting is only declared in one place.
|
||||||
|
|
||||||
|
@ -62,7 +64,7 @@ INSERT INTO "config" ("group","key","value","inserted_at","updated_at") VALUES (
|
||||||
|
|
||||||
* config :pleroma, Pleroma.Web.Endpoint
|
* config :pleroma, Pleroma.Web.Endpoint
|
||||||
* config :pleroma, Pleroma.Repo
|
* config :pleroma, Pleroma.Repo
|
||||||
* config :pleroma, configurable_from_database
|
* config :pleroma, configurable\_from\_database
|
||||||
* config :pleroma, :database, rum_enabled
|
* config :pleroma, :database, rum_enabled
|
||||||
* config :pleroma, :connections_pool
|
* config :pleroma, :connections_pool
|
||||||
|
|
||||||
|
@ -74,7 +76,6 @@ use Mix.Config
|
||||||
config :pleroma, Pleroma.Web.Endpoint,
|
config :pleroma, Pleroma.Web.Endpoint,
|
||||||
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
|
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
|
||||||
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
adapter: Ecto.Adapters.Postgres,
|
adapter: Ecto.Adapters.Postgres,
|
||||||
username: "pleroma",
|
username: "pleroma",
|
||||||
|
@ -85,7 +86,7 @@ config :pleroma, Pleroma.Repo,
|
||||||
config :pleroma, configurable_from_database: true
|
config :pleroma, configurable_from_database: true
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Start your instance back up and you can now access the Settings tab in AdminFE.
|
5. Restart instance you can now access the Settings tab in AdminFE.
|
||||||
|
|
||||||
|
|
||||||
## Reverting back from database config
|
## Reverting back from database config
|
||||||
|
|
Loading…
Reference in New Issue