The reason for moving the ENV out of
entrypoint.sh is the ENV was only getting set when the application launched (using the Dockerfile CMD command). This worked fine for launching the application.
When logging in via SSH and running
app/bin/hello_elixir remote, the ENV values weren’t set and it would fail to connect to the local running node. The hello_elixir part of the command is a generated shell script. When moving the config to
rel/env.sh.eex, it gets generated into a
env.sh script that gets auto-executed when running any release command. So it’s really the right place for it to live. Hope that makes sense!
I’m glad you like the podcast! I’d love to figure out a way to get more regular interaction with interested listeners. Maybe a Discord server?