ityonemo
.iex.exs for releases?
Is there a way to make an equivalent for .iex.exs for releases, where a handful of modules are aliased or imported that are useful for the operator in the shell in deployment, or should we just ship .iex.exs to the home directory of the deployment?
Most Liked
LostKobrakai
I’d tend to argue against having something like .iex.exs loaded automatically in production. The remote console is quite resistant to errors and not accidentally blowing up production, but even just crashing on startup of the console and potentially blocking you from accessing the the console is something I’d try to avoid greatly. I’d rather have a function like MyApp.Ops.load_my_stuff, which does the same, but needs to be called once manually.
benwilson512
Yeah I have a help.ex module in my projects inside of which I have defmodule Help and a __using__ macro so that when I remote console in I can just use Help and get all the things I want.
On the other hand though, if the .iex.exs file really does cause issues you could always remote console into the server / container and delete it before remote consoling into the actual BEAM instance.
ityonemo
OMG sorry to necro this but a use Help is brilliant. Mostly what i want in my remote iex is imports and aliases anyways, and it’s a burden to remember each time… but “use Help” is perfect, because it’s easy to remember and only 9 keystrokes.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








