Skip to content
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

Remove godotenv (which breaks dotenv) and build a macos arm version #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imajes
Copy link

@imajes imajes commented Apr 21, 2021

@DarthSim -

a couple things here, and I didn't mess with tests, so very much assume this is not mergeable as is.... however.

the big thing is removing the godotenv module. the reason being, dotenv allows you to overload -- so, you can define project envs in .env, and say local overrides in .env.local, for example. a nice way to prevent committing secrets.

for safety, however, ruby's dotenv won't override existing env vars, typically those defined outside the scope of its runtime.

godotenv doesn't understand this functionality, so it's just loading .env and nothing else -- and because those vars are defined before ruby starts, ruby's dotenv won't override them, and so local env settings are busted.

tbh, i don't think it's appropriate for hivemind to be including them anyhow. if people want them and they're not already available, it's pretty easy to run a shell/pre-command to define the env within the Procfile... whereas being forced to define them via godotenv breaks things. hence the PR. :)

also, i added a line to build a macos arm64 version, because m1.

hope it helps!

@DarthSim
Copy link
Owner

Hi James,

Loading .env is a common feature of Procfile launchers, I'd even say it's a must-have feature. Many Hivemind users use this feature, and removing it is not an option.

I'd recommend you not include common variables to .env and move them environment-related files, as we do on our projects.

Also, you can add a flag that disables loading .env instead of completely removing the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants