Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know it's probably not the answer you're looking for, but you can learn a lot by just reading the code of popular Elixir libraries, such as Ecto, Phoenix, etc.

Error messages have gotten better in Elixir 1.5 The whole ecosystem is actually getting better with each release.

For shipping to production I use 'distillery'. You create a 'release' and you can even instruct it to read some arguments from the env vars.

But yeah, more resources would definitely be welcome. Hopefully as more people start using the language, more resources will be created.



I appreciate the response, at any rate.

I will read more libraries; hopefully I can find some which use flow.

I have used distillery but I find myself going down a pretty big rabbit hole just to release something which in most languages is pretty simple. I will look at it again.


If it's any help: I use docker multistage to build a barebones alpine docker image. It uses distillery.

I based my dockerfile on https://gist.github.com/bsedat/16cb74ebc8ab0ed61ac598a129b0a...

Blogpost: https://zorbash.com/post/docker-multi-stage-elixir-distiller... (I'm not the author)


I just got the same setup this week. Docker multistage builds are amazing and make builds super small and awesome. You can ship releases without having to install Erlang or elixir on the imag, and just use what distillery has. Distillery really is amazing.


Releases and deployments with Elixir are still the area that needs most work, but it's nothing that would ever prevent me from using it. I have several in production and once we figured it out, it was easy peasy from there on.

We have some on DO and some on Heroku for clients. Both work well enough.


> You create a 'release' and you can even instruct it to read some arguments from the env vars.

That's my main complain about Elixir. Releasing and configuring at runtime is a huge pain. I honestly don't see any value in this whole "compile time configuration". If it's at compile time, I can put it in the code. What I call configuration is things I can change at runtime. The fact that something that is a given in any language (config via env vars) requires an extra dependency in Elixir is kind of sad.

Otherwise I love the language, the paradigm and the platform.


Yep, I think there should be some included Config behaviour module which handles the serialising / deserialising of a config file, and genservers can register themselves against it, and when the config changes the registered genservers get terminated and restarted gracefully.

I don't think it's very much work - but everytime i try to build something like this I go down this path of trying to work out exactly what the architecture should be like.

Maybe it's a config application you include in extra_applications. How would you tell it the format of the file? How could you do validations?

And then maybe do an escript or similar for configuring it on the fly - something like "elixir_set <variable> <value>"


I think I fail to see your point. You can fetch any environment variable – e.g. `System.get_env("SHELL")` – and do whatever with it. But distillery has its own way of defining configurations. You can still mix and match.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: