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

Standardizing environment variables & config for deployments #42

Closed
thebigredgeek opened this issue Apr 24, 2017 · 6 comments
Closed

Standardizing environment variables & config for deployments #42

thebigredgeek opened this issue Apr 24, 2017 · 6 comments

Comments

@thebigredgeek
Copy link

No description provided.

@thebigredgeek
Copy link
Author

Currently impossible to deploy as-is. Expects mongo to be running locally

@EricSimons
Copy link
Member

Some codebases do use env vars but we currently don't have a strict spec for it. Perhaps this is something that we should add to the spec @BRWR @apai4? Should require pretty minimal mods to the codebases, and then we could make deployments a reality.

@EricSimons
Copy link
Member

EricSimons commented Apr 24, 2017

Interested in how we could standardize env vars across the board for all languages/frameworks. Would love to hear thoughts on this.

@jamesbrewerdev
Copy link

👍

If this is a blocker to having common deployments across implementations, then we should absolutely do it.

Standardizing naming may prove to be tricky, but I think we can make it work. The best thing to do here is take each env var as it comes up.

Since databases were mentioned here, I'd say we should use DATABASE_URL. Most database adapters should support connecting via a database URL. This removes the need to specify other env vars such as DATABASE_HOST, DATABASE_PASSWORD, etc.

@apai4
Copy link
Member

apai4 commented Apr 24, 2017

Currently I've been setting environment variables as part of the deployment tutorials, partially because it leaves setting environment variables out of scope until you have to deploy (for better or for worse), and because there some minor differences in how to get the codebases deployed between platforms.

I do agree that a unified spec for environment variables would be nice, but I'm not sure what the best implementation is. Like @BRWR mentioned, some hosting platforms provide a single DATABASE_URL vs others provide multiple variables, so is environment variable naming based off of minimal amount of configuration required, what's most widely used, or some other criteria?

Another option is leaving environment variables as a deployment concern, providing guidance to set up the environment variables as needed, since some may argue that it may more closely resemble preparing a codebase for deployment (although definitely much less approachable).

Perhaps a combination of the above is most realistic? We could select sensible defaults for environment variables that "just work" on specific platforms, but have documentation on how to go about configuring the codebase for other platforms.

Lmk what you guys think!

@EricSimons EricSimons changed the title Environment variables rather than static reference URLs to databases, etc Standardizing environment variables & config for deployments Apr 24, 2017
@deksden
Copy link

deksden commented May 2, 2017

Good discussion about ports is here: #62

We should be aware of default port because each backend and frontend is already expecting some default port and can be configured via some env vars (like PORT for React)

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

No branches or pull requests

6 participants