-
Notifications
You must be signed in to change notification settings - Fork 128
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
Environment support #125
base: master
Are you sure you want to change the base?
Environment support #125
Conversation
I haven't really looked at the code closely, so can you explain in more detail what this is doing? Is it expanding ENV variables declared in a I'm hesitant to add this as it seems like more things to manage and document. It could confuse people who aren't expecting modd to do anything with a |
Sure thing! Apologies in advance for some of the diffs, some of it is editor styling, and a chunk of it is updating deps. Honestly, I thought the project might be set for archival, so much of this is to support my own usage, and the PR is kind of an "in case this is still maintained and you can get something useful from it" sort of situation. I understand the demands of work/open source balance. Think of this as a WIP to cherry pick from or something I can trim down if you like. So, for my use-case, I use modd for local development on a single-module project with a few different microservices, using containers for my downstream dependencies. My modd.conf spins up the services I want to live code on, rebuilding them when I need. So far so good. The services configure themselves using the environment, and it's handy to be able to change these values in one place. I can't change them in the The PR also adds the ability to expand environment variables in the commands issued by With regards to confusing people, that's 100% your call to make as the maintainer, since it's your project and your vision. For my part, I was confused that modd did not provide any functionality with regards to environment. As I saw it, anything that controls services with a config file benefits from some sort of environment handling, even if it's just a plain If you think some part of this might be useful, I am happy to discuss, amend, withdraw or reissue. It's your show! |
The env file stuff doesn't expand anything. It's simple KV environment variables that it adds into the environment of subprocess calls, such as daemons, for which it is intended.
Edit: yes, actually, I believe it does in the current implementation. At least for prep commands within that block. Env is added to the block when the directive is encountered. It doesn't need to do it this way, and can be modified to be cumulative and additive if necessary. Or it can apply only to the daemons, which is its intended use in the first place.
It expands environment variables in commands and
This allows services to continue being configured the way they would in a container (if they're using the environment). |
I don't see me really diving into this PR for at least a couple months. I know that sounds nuts, but I need to prioritize a few other projects and I really don't have too much time to manage this aside from trying to keep it working. Just letting you know so you don't take it the wrong way 😄 |
No problems here. It's fire-and-forget as far as I'm concerned.
…On Mon, Mar 20, 2023 at 12:47 PM Jon Calhoun ***@***.***> wrote:
I don't see me really diving into this PR for at least a couple months. I
know that sounds nuts, but I need to prioritize a few other projects and I
really don't have too much time to manage this aside from trying to keep it
working. Just letting you know so you don't take it the wrong way 😄
—
Reply to this email directly, view it on GitHub
<#125 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHCJJG3RZMV4DBAGAHNGQDW5CCZ3ANCNFSM6AAAAAAU64SIOE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This PR addresses support for cumulative environment modification with .env files as well as OS environment variable expansion in commands and the
indir
directive.