Refactor mix tasks a bit and make config generator work with releases
See merge request pleroma/pleroma!1312
end
def run(["migrate_from_db", env]) do
- Common.start_pleroma()
+ start_pleroma()
if Pleroma.Config.get([:instance, :dynamic_configuration]) do
- config_path = "config/#{env}.migrated.secret.exs"
+ config_path = "config/#{env}.exported_from_db.secret.exs"
{:ok, file} = File.open(config_path, [:write])
+ IO.write(file, "use Mix.Config\r\n")
Repo.all(Config)
|> Enum.each(fn config ->