5 ms·
1. It's a functional thing, it's quite nice after you use it for a bit, and really powerful because you can use it for any data, and not just when working with
by ch4s3 6y ago
1. It's a functional thing, it's quite nice after you use it for a bit, and really powerful because you can use it for any data, and not just when working with a DB.
2. There are several ways. You can use releases [1]; copy the code to the box, run mix release, then ./app start, and point whatever you want to that process. If you're running phoenix you could always compile it on the box and just run mix phx.server. I wouldn't do that though. You could also use a tool like distillery[2] which is kind of like releases. There is another more esoteric option where you build locally without the runtime, but I wouldn't recommend that.
[1] https://elixir-lang.org/getting-started/mix-otp/config-and-releases.html https://elixir-lang.org/getting-started/mix-otp/config-and-r...
[2] https://hexdocs.pm/distillery/tooling/cli.html https://hexdocs.pm/distillery/tooling/cli.html
- joeyspn 6y ago+1 for distillery, very convenient... https://github.com/bitwalker/distillery https://github.com/bitwalker/distillery
- losvedir 6y agoOnce `mix release` was added natively to Elixir in 1.9, I haven't found the need to use distillery anymore. Is there still a use case?
- deleted 6y ago[deleted]
- ch4s3 6y agoDistillery has 2 strong use cases; it has config providers which allow for a lot of config flexibility and it can support hot code upgrades.