From 1cae564b5d749a23f29a5303a82e27e2952a55ed Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 3 Oct 2019 14:12:57 +0300 Subject: Move config task docs to a separate file and mark it as WIP --- docs/administration/CLI_tasks/config.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/administration/CLI_tasks/config.md (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md new file mode 100644 index 000000000..ce19e2402 --- /dev/null +++ b/docs/administration/CLI_tasks/config.md @@ -0,0 +1,19 @@ +# Transfering the config to/from the database + +!!! danger + This is a Work In Progress, not usable just yet. + +Every command should be ran with a prefix, in case of OTP releases it is `./bin/pleroma_ctl config` and in case of source installs it's +`mix pleroma.config`. + +## Transfer config from file to DB. + +```sh +$PREFIX migrate_to_db +``` + +## Transfer config from DB to `config/env.exported_from_db.secret.exs` + +```sh +$PREFIX migrate_from_db +``` -- cgit v1.2.3 From eb9ea8475b19d6a00f690421b193310c09ba40f3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Mon, 9 Dec 2019 04:07:16 +0300 Subject: docs: add OTP/From source tabs to CLI tasks --- docs/administration/CLI_tasks/config.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md index ce19e2402..e9d44b9a4 100644 --- a/docs/administration/CLI_tasks/config.md +++ b/docs/administration/CLI_tasks/config.md @@ -3,17 +3,26 @@ !!! danger This is a Work In Progress, not usable just yet. -Every command should be ran with a prefix, in case of OTP releases it is `./bin/pleroma_ctl config` and in case of source installs it's -`mix pleroma.config`. +{! backend/administration/CLI_tasks/general_cli_task_info.include !} ## Transfer config from file to DB. -```sh -$PREFIX migrate_to_db +```sh tab="OTP" + ./bin/pleroma_ctl config migrate_to_db ``` +```sh tab="From Source" +mix pleroma.config migrate_to_db +``` + + ## Transfer config from DB to `config/env.exported_from_db.secret.exs` -```sh -$PREFIX migrate_from_db +```sh tab="OTP" + ./bin/pleroma_ctl config migrate_from_db ``` + +```sh tab="From Source" +mix pleroma.config migrate_from_db +``` + -- cgit v1.2.3 From f01ab6cd29aaae39fef6a95ec8490223fb692499 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 21 Jan 2020 17:49:22 +0300 Subject: some refactor and tests --- docs/administration/CLI_tasks/config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md index e9d44b9a4..fe76b534b 100644 --- a/docs/administration/CLI_tasks/config.md +++ b/docs/administration/CLI_tasks/config.md @@ -18,11 +18,11 @@ mix pleroma.config migrate_to_db ## Transfer config from DB to `config/env.exported_from_db.secret.exs` +To delete transfered settings from database optional flag `-d` can be used. ```sh tab="OTP" - ./bin/pleroma_ctl config migrate_from_db + ./bin/pleroma_ctl config migrate_from_db --env= [-d] ``` ```sh tab="From Source" -mix pleroma.config migrate_from_db +mix pleroma.config migrate_from_db --env= [-d] ``` - -- cgit v1.2.3 From a9c6f119ac8fb2124241a61b26d97bff207218d8 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Wed, 22 Jan 2020 18:08:53 +0300 Subject: docs update --- docs/administration/CLI_tasks/config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md index fe76b534b..2af51c247 100644 --- a/docs/administration/CLI_tasks/config.md +++ b/docs/administration/CLI_tasks/config.md @@ -18,11 +18,11 @@ mix pleroma.config migrate_to_db ## Transfer config from DB to `config/env.exported_from_db.secret.exs` -To delete transfered settings from database optional flag `-d` can be used. +To delete transfered settings from database optional flag `-d` can be used. is `prod` by default. ```sh tab="OTP" - ./bin/pleroma_ctl config migrate_from_db --env= [-d] + ./bin/pleroma_ctl config migrate_from_db [--env=] [-d] ``` ```sh tab="From Source" -mix pleroma.config migrate_from_db --env= [-d] +mix pleroma.config migrate_from_db [--env=] [-d] ``` -- cgit v1.2.3 From 6722dade42d5f404c00386b0336d821028d58d7c Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 6 Feb 2020 15:00:33 +0300 Subject: Simplify in-database config docs Large part of it was no longer true (i.e none of the changes need recompilation anymore and you can't brick an instance by changing them, it's not necessary to manually truncate the db manually anymore) --- docs/administration/CLI_tasks/config.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md index 2af51c247..873775962 100644 --- a/docs/administration/CLI_tasks/config.md +++ b/docs/administration/CLI_tasks/config.md @@ -1,12 +1,16 @@ # Transfering the config to/from the database -!!! danger - This is a Work In Progress, not usable just yet. - {! backend/administration/CLI_tasks/general_cli_task_info.include !} ## Transfer config from file to DB. +!!! note + You need to add the following to your config before executing this command: + + ```elixir + config :pleroma, configurable_from_database: true + ``` + ```sh tab="OTP" ./bin/pleroma_ctl config migrate_to_db ``` @@ -18,7 +22,15 @@ mix pleroma.config migrate_to_db ## Transfer config from DB to `config/env.exported_from_db.secret.exs` +!!! note + In-Database configuration will still be applied after executing this command unless you set the following in your config: + + ```elixir + config :pleroma, configurable_from_database: false + ``` + To delete transfered settings from database optional flag `-d` can be used. is `prod` by default. + ```sh tab="OTP" ./bin/pleroma_ctl config migrate_from_db [--env=] [-d] ``` -- cgit v1.2.3 From 01da001da15e102eff5c38277d9d4c865e8b3fab Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 7 Feb 2020 10:48:10 +0300 Subject: fix --- docs/administration/CLI_tasks/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/administration/CLI_tasks/config.md') diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md index 873775962..cc32bf859 100644 --- a/docs/administration/CLI_tasks/config.md +++ b/docs/administration/CLI_tasks/config.md @@ -29,7 +29,7 @@ mix pleroma.config migrate_to_db config :pleroma, configurable_from_database: false ``` -To delete transfered settings from database optional flag `-d` can be used. is `prod` by default. +To delete transfered settings from database optional flag `-d` can be used. `` is `prod` by default. ```sh tab="OTP" ./bin/pleroma_ctl config migrate_from_db [--env=] [-d] -- cgit v1.2.3