axelson
Scenic Core Team
Elixir Blog Post: Tips for Improving Your Elixir Configuration
I talk about how I really like to use runtime configuration and discuss some common pitfalls of configuration in Elixir.
Most Liked
donghyun
This post is so helpful! Thanks a lot!
Especially I like the last part about using Code.require_file/2. But I tried that and found it doesn’t work in my release app. It is due to the second parameter of Code.require_file/2 which is the relative file path. In my Dockerfile I copy only release output(under _build/prod/rel/) to my workdir, though there is no config/ directory. So I change the file path like that:
case config_env() do
:prod -> Code.require_file("runtime.prod.exs", __ENV__.file |> Path.dirname())
end
Then it works well. Anyway, thanks for the great post again!
2
Samuel-88
Lots of great info I had no idea about! Thanks for sharing!
2
Popular in Blog Posts
This is a very short article about using AWS Systems Manager Parameter Store to load secret configuration in a simple way.
New
Posted via Devtalk (see this thread for details).
New
Livebook was created for machine learning in Elixir but Livebook isn’t limited to machine learning. I found it works really well for docu...
New
So you’re enjoying using WebSockets with Elixir’s Phoenix Framework, and you want to send some binary messages. Maybe it’s an audio clip,...
New
Add drag-and-drop functionality to your Phoenix LiveView app with SortableJS and LiveView Hooks! This posts shows you how to create an in...
New
In this post I explore the silos that exist in the Elixir ecosystem, the pros and cons, and what we can improve.
New
Update:
How to use the blogs section
You can post in one of the Official Blog Posts threads (like this one), or, via Devtalk and a new t...
New
Hi! :wave:
I wanted to refresh my knowledge on how to mix phx.gen.auth with local password users db, as well as OAuth providers such as ...
New
Sorting and deleting many-to-many associations made easy with Ecto’s :sort_param and :delete_param options from cast_assoc, powered by Li...
New
Dialyzer is a tool that you’ve probably heard about in the Elixir community. You may have even used it. However, adding Dialyzer to an ex...
New
Other popular topics
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New







