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

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
Hey everyone! :waving_hand: I’ve published Part 7 of the Building Distributed Systems in Elixir series, where we build core distributed ...
New
zorn
An educational side project in Elixir, Phoenix, and Tauri. I share what I learned while wiring Automerge into the BEAM, including how I s...
New
nathanl
Process labels are useful for visualization and debugging. Here’s why you should use them.
New
abreujp
New article: Elixir Project Structure — From mix new to a Growing Codebase I’ve published a new article in my Elixir learning series on d...
New
andreasronge
What happens if you design tools for LLMs instead of letting LLM use human tools ? Wrote a blog on why and what that enables. As I see ...
New
mudasobwa
Somewhere, right now, a senior engineer is on the verge of a nervous breakdown because his company will not let him switch from Claude to...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews