-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Troubles getting started #155
Comments
Actually, it's funny, I'm running into a similar problem.
It's funny as well, if I leave my prod.ex file the way it was before using conform so with a line like
Then I find that when I deploy my release the "DATABASE_URL" gets read from the system just when I start the app with the bin script start. So that if I have that env var set when I start it works, if I don't have it, it doesn't work. I always heard that the system.get_env gets read at compile time, it is not true in my case. If I remove the url line from my prod.ex entirely, then on start I have a database_url not find. I verified on both cases that the sys.config file gets generated properly with all the values I want. Did I forget anything, what am I doing wrong? |
Ok After some more research on this |
@happysalada Did you manage to figure anything out on this? I'm still stuck... |
@brandonparsons so in the distillery library it talks about several environment variables that you can configure (stuff like RELEASE_CONFIG_DIR, find some more here). I tried changing some of them but couldn't get it to work. Maybe you'll be luckier. What I ended up doing was using the REPLACE_OS_VARS=true trick. You set that env variable and then in your config file you replace System.get_env by "${your_env_variable}". That worked for me. |
I have been using distillery, and specifically tried using Conform to get
away from that stuff. Hopefully @bitwalker can chime in at some point.
…On Sun, Jun 24, 2018 at 5:19 PM Raphael Megzari ***@***.***> wrote:
@brandonparsons <https://github.com/brandonparsons> so in the distillery
library it talks about several environment variables that you can configure
(stuff like RELEASE_CONFIG_DIR
<https://hexdocs.pm/distillery/runtime-configuration.html#content>, find
some more here
<https://github.com/bitwalker/distillery/blob/master/docs/shell_scripts.md>).
I tried changing some of them but couldn't get it to work. Maybe you'll be
luckier.
What I ended up doing was using the REPLACE_OS_VARS=true trick. You set
that env variable and then in your config file you replace System.get_env
by "${your_env_variable}". That worked for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#155 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABN86pyngNPZkZbHqShcF83llmIPI69rks5uAB6XgaJpZM4Uqn0n>
.
|
Hello. Facing a similar problem. Is there any way to use |
Hi there,
I'm trying to get started for the first time with conform. Having some trouble with what I thought would be the easy part! :)
I have an umbrella app - one of the applications inside houses an
ecto
repo. I decided to try to start pulling in conform in that app as it would be easiest to know if something was broken.I've created
shared_repo.schema.exs
andshared_repo.dev.conf
. If I usemix conform.effective
, I see some values I expect:However, when I attempt to boot the app, it blows up as it can't find a
database
key inside the configuration for the repo. I'm a bit confused and don't know what to do next. The app boots fine just using a standardconfig.exs
andconfig.dev.exs
.Any help you could provide would be appreciated!
The text was updated successfully, but these errors were encountered: