From: Alex Gleason Date: Sun, 16 May 2021 17:26:32 +0000 (-0500) Subject: Make prod.secret.exs optional (with warning) X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b22f54eb29237b4c34a26b497f88770dbebf5578;p=akkoma Make prod.secret.exs optional (with warning) --- diff --git a/config/prod.exs b/config/prod.exs index adbce5606..0e151000b 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -63,7 +63,12 @@ config :logger, :ex_syslogger, level: :info # Finally import the config/prod.secret.exs # which should be versioned separately. -import_config "prod.secret.exs" +if File.exists?("./config/prod.secret.exs") do + import_config "prod.secret.exs" +else + "`config/prod.secret.exs` not found. You may want to create one by running `mix pleroma.instance gen`" + |> IO.warn([]) +end if File.exists?("./config/prod.exported_from_db.secret.exs"), do: import_config("prod.exported_from_db.secret.exs")