bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.96k stars 398 forks source link

No longer able to generate environment in config.exs in distillery 2.0 #577

Closed nulian closed 5 years ago

nulian commented 5 years ago

Is there still a way to dynamically generate environments?

Was using in distillery before 2.0 a loop to define environments. Because of the different customer deploy environments we have. But since 2.0 the each seems to be done after the check for environment configs so it will throw an error there is no environment available. Using distillery with edeliver.

[:test, :test2, :test3] |> Enum.each(fn(env) ->
  environment env do
    plugin Releases.Plugin.LinkConfig
    plugin Releases.Plugin.ModifyRelup

    set include_erts: true
    set include_src: false
    set cookie: :bla
  end
end)
bitwalker commented 5 years ago

That code doesn't produce any results, just :ok, perhaps you meant to use map?