This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
neilbmclaughlin
temporarily deployed
to
connecting-to-services-pr-51
September 26, 2016 12:44
Inactive
I'd be happy to see dotenv removed and allow require-environment-variables to trap missing environment variables. In the longer term it would be good to have a dotfile (perhaps as part of the project) for developers which sets up an environment for a new developer (install node, clone repo, setup public env vars) and a private repo for secret env vars such as the the api key. In would also be useful to have scripts for the creation of a heroku and azure apps (including env vars) which will stand as documentation of our setup rather than requiring manual inspection through the UI. |
neilbmclaughlin
approved these changes
Sep 26, 2016
Do you want me to merge this, remove the usage of dotenv or wait for you to respond? |
I'll sort it out by removing |
st3v3nhunt
force-pushed
the
feature/ssh-submodule
branch
from
September 26, 2016 15:06
b901c4d
to
aa2f333
Compare
st3v3nhunt
force-pushed
the
feature/ssh-submodule
branch
from
September 26, 2016 15:13
aa2f333
to
3ad6f8c
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Azure deployments are breaking because it doesn't have access to the GitLab repo. There are 2 steps involved in fixing it:
username:password
)I originally thought (see below) the vars in the env would be overridden by the
.env
file vars but this is not the casehttps://www.npmjs.com/package/dotenv#what-happens-to-environment-variables-that-were-already-set
However, this has got me thinking about the whether handling the env vars via submodules is a good idea. This is the second thing that has had to be dealt with differently due to the approach (the other being the ignoring of submodules in Travis).
Some of the original reasons for taking this approach was to:
If the submodule was removed the repo can still live and contain development versions of the vars for reference so no loss there. Having an automated setup for development environments - well that could just be a case of accepting that the environment variables need to available. Which does take a little bit of remembering but can be included in the
README.md
. A benefit of doing that would be that thedotenv
package could be removed and all environments would be using the same mechanism.Thoughts?
This does mean the Azure deployments are now going to be using the env vars from the repo which is the same as the development environment but no other environment i.e. CI, Heroku. This is not ideal.Whether as part of this change or another one, the way of handling env vars need to be brought back to be consistent. Looking at the docs there are other ways to load env vars e.g. start the app with the file which would be something we could do just for development and let all other environments use the env vars they have.Some thought required. I think having another look at https://12factor.net/config might be a good idea.