-
Notifications
You must be signed in to change notification settings - Fork 24
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
Setting environment variables (for :start task, maybe :compile)? #213
Comments
For now we pass the responsibility down to the current gist is that you would set an ENV variable on your target host and then use the We're kind of hoping that the research/work that bitwalker is doing around deploys for Dockyard results in a nicer way to handle runtime variables. He's giving a talk at Lonestar ElixirConf in a couple weeks and i'm hoping this topic comes up |
It sounds like it might still be desirable for Bootleg to allow passing through environment variables to the bootleg/lib/bootleg/tasks/build.exs Lines 26 to 33 in a33ac9b
|
yeah, that's a good point. we could just prepend any provided ENV vars to the |
brainstorming: role :build, "build.example.com", workspace: "/tmp/build/myapp", env: %{port: 1234, var2: "foo"} then during task the
|
That looks like a nice approach to me @brienw 👍 I think you probably meant to make the |
As an extra, it might be useful to add a |
👍 to |
Awesome 🙌 So looking forward to this. Currently I am overwriting the Let me know if you'd like me to test-drive any changes here or I can chip in. On a side note: I also hope to work on SSHKit some more in whatever time I can find and hope to get around to things like connection caching which should make deployments slightly faster. I also have some vague ideas about an alternative "backend" from the Erlang default, which could allow for ssh-agent support. As a first step though, I am currently introducing Mox for unit testing and ironing out a few smaller inconsistencies. I'd be more than happy to hear from you guys if you have any priorities on your wishlist for SSHKit 🙏 |
I'm gonna add another Issue to track the addition of an automatic |
Closed by [#218] |
Hi, I hope you don’t mind me bothering you 🙂 Thanks a lot for your quick replies!
I was wondering what your strategy for environment variables with bootleg is.
More specifically: I would like to pass a
PORT
environment variable when starting an app. For now what I did is to override the:start
task in the environment – obviously a hack:Unfortunately I don't have any control over what environment the system sets by default.
I bet there's a better way, maybe you can help me out?
The text was updated successfully, but these errors were encountered: