axelson

axelson

Scenic Core Team

I talk about how I really like to use runtime configuration and discuss some common pitfalls of configuration in Elixir.

Showing Posts 1 to 3

donghyun

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!

Samuel-88

Samuel-88

Lots of great info I had no idea about! Thanks for sharing!

dimitrije

dimitrije

Hi @axelson
I have been following your blog post, but somehow I cannot start my app, I get the following error: Application testapp exited: shutdown Kernel pid terminated (application_controller) ("{application_terminated,testapp,shutdown}")

The code is the same as in your blog post.
When starting the app Core.require_file/2 returns [] . As it seems I am missing something, but don’t know what.
I have config/config.exs
config/runtime.prod.exs
config/runtime.test.exs
config/runtime.dev.exs
config/runtime.exs

config/config.exs does not have the line to import other configs.
Please help.

Thanks!

— All posts loaded —

Where Next? Top

Trending in Blog Posts Top

mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
pckrishnadas88
A while back, I had to process millions of database updates in a legacy system that was already hitting its 64 GB RAM limit, so scaling t...
New
rhcarvalho
At the heart of every Phoenix application is the often “invisible” HTTP server layer. For over a decade Cowboy has served the community ...
New
smaller_infinity
I recently figured out how to the the Rust hotpath profiling crate running in an elixir benchmark script (for profiling NIFs). I had some...
New
rhcarvalho
The Phoenix framework is notorious for its long term stability and dependability. Unlike most comparable projects, the Phoenix team activ...
New
pckrishnadas88
I’ve published Part 3 of my Elixir distributed systems learning series. This part explores process monitoring using the low-level primit...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews