3 ms·
Ah nice to know. I've seen a bunch answers around having to jump through larger hoops to get to run mix tasks in releases. Are all config options still availab
by nickjj 6y ago
Ah nice to know.
I've seen a bunch answers around having to jump through larger hoops to get to run mix tasks in releases. Are all config options still available to be read in mix tasks that are called that way? What about Mix functions like Mix.env()?
If you Google around the topic of database migrations in Elixir releases you'll find like 5 different ways to do them with no clear "this is the best answer".
- Ndymium 6y agoMix doesn't exist in releases. You can get config options like normal, but not `Mix.env/0`. You can compile your current env into a config option though, and use that at runtime. Here's an example how to set up an Ecto migrator task with Mix releases: https://hexdocs.pm/phoenix/releases.html#ecto-migrations-and-custom-commands https://hexdocs.pm/phoenix/releases.html#ecto-migrations-and...