diff options
author | feld <feld@feld.me> | 2020-07-13 15:42:20 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-07-13 15:42:20 +0000 |
commit | 63fef0c0fb8e8d95b441d50e8dac3ef2c782a84f (patch) | |
tree | 4ec30c8ca9eb94ba494a925c5012698c95785397 /lib | |
parent | db529d454ebd2fa47f70c916c60960b3842826da (diff) | |
parent | d1cd3f4ec06214dc85e11dca30f193ee7d093488 (diff) | |
download | pleroma-63fef0c0fb8e8d95b441d50e8dac3ef2c782a84f.tar.gz |
Merge branch 'chore/improve-database-config-docs' into 'develop'
Improve database config migration and add documentation
See merge request pleroma/pleroma!2756
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mix/tasks/pleroma/config.ex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex index d5129d410..904c5a74b 100644 --- a/lib/mix/tasks/pleroma/config.ex +++ b/lib/mix/tasks/pleroma/config.ex @@ -83,7 +83,7 @@ defmodule Mix.Tasks.Pleroma.Config do defp migrate_from_db(opts) do if Pleroma.Config.get([:configurable_from_database]) do - env = opts[:env] || "prod" + env = opts[:env] || Pleroma.Config.get(:env) config_path = if Pleroma.Config.get(:release) do @@ -105,6 +105,10 @@ defmodule Mix.Tasks.Pleroma.Config do :ok = File.close(file) System.cmd("mix", ["format", config_path]) + + shell_info( + "Database configuration settings have been exported to config/#{env}.exported_from_db.secret.exs" + ) else migration_error() end @@ -112,7 +116,7 @@ defmodule Mix.Tasks.Pleroma.Config do defp migration_error do shell_error( - "Migration is not allowed in config. You can change this behavior by setting `configurable_from_database` to true." + "Migration is not allowed in config. You can change this behavior by setting `config :pleroma, configurable_from_database: true`" ) end |