Skip to content

Remove Mix.env() from code in lib/

Nick Thomas requested to merge lupine/pleroma:remove-mix-env-from-lib into develop

Following this stack overflow advice: https://stackoverflow.com/questions/35888575/mix-env-0-equivalent-in-production-env

I'm in the process of trying to switch to distillery-based deployment of pleroma: https://hackernoon.com/mastering-elixir-releases-with-distillery-a-pretty-complete-guide-497546f298bc . There's work left to do (especially around executable configuration) before this is merge-worthy, but this is one change that seems to be required.

When running Pleroma from a distillery release, Mix.getenv doesn't seem to be available, and running pleroma fails with a backtrace referencing the missing function in lib/application.exs.

This approach allows pleroma to run successfully in such an environment.

Merge request reports