Node-config custom-environment-variables not Picking Docker environment Variablesnodejs sequelize/cli how to use with node-configGetting node-config related typescript error when compilingNode-config global configurationnode-config multiple configuration filesHow does one include Heroku environment variables using node-config?NodeJS - config cannot not load custom environment variablesHow to use node-config in typescript?How to mutate node-config in memorycan't access .env with node-config
What verb for taking advantage fits in "I don't want to ________ on the friendship"?
How do I present a future free of gender stereotypes without being jarring or overpowering the narrative?
Why don't we add Wilson loops to the SM Lagrangian?
Is it okay to fade a human face just to create some space to place important content over it?
Sharing referee/AE report online to point out a grievous error in refereeing
Thin wall to block LED light from hitting photodiode?
Are gliders susceptible to bird strikes?
Journal standards vs. personal standards
How Do I Know When I am in Private Mode?
Company threatening to call my current job after I declined their offer
If two black hole event horizons overlap (touch) can they ever separate again?
How to describe POV characters?
Preferred word for "preferred", "target", "chosen" in end user support documentation
Movie with Zoltar in a trailer park named Paradise and a boy playing a video game then being recruited by aliens to fight in space
Closest Proximity of Oceans to Freshwater Springs
I hit a pipe with a mower and now it won't turn
Which is better for keeping data: primary partition or logical partition?
13th chords on guitar
Prime parity peregrination
Most elegant way to write a one-shot 'if'
The warming up game
Why were the first airplanes "backwards"?
How to properly say asset/assets in German
Could human civilization live 150 years in a nuclear-powered aircraft carrier colony without resorting to mass killing/ cannibalism?
Node-config custom-environment-variables not Picking Docker environment Variables
nodejs sequelize/cli how to use with node-configGetting node-config related typescript error when compilingNode-config global configurationnode-config multiple configuration filesHow does one include Heroku environment variables using node-config?NodeJS - config cannot not load custom environment variablesHow to use node-config in typescript?How to mutate node-config in memorycan't access .env with node-config
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Working on Windows OS.
My node app using node-config isn't using docker environment variables. It's always using the default config.
I am using node-config custom environment variables as described here: https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables
Everything is working well when running the app locally. The config by passes the default ones and takes the ones defined in my User variables when set.
Problem
- I start a docker instance with all required Environment variables
set. - I verify the env variables by running
docker exec container_name env
However, the node app still uses the default config, instead of the environment variables.
I am not sure what setup I may be missing.
node-config
add a comment |
Working on Windows OS.
My node app using node-config isn't using docker environment variables. It's always using the default config.
I am using node-config custom environment variables as described here: https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables
Everything is working well when running the app locally. The config by passes the default ones and takes the ones defined in my User variables when set.
Problem
- I start a docker instance with all required Environment variables
set. - I verify the env variables by running
docker exec container_name env
However, the node app still uses the default config, instead of the environment variables.
I am not sure what setup I may be missing.
node-config
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03
add a comment |
Working on Windows OS.
My node app using node-config isn't using docker environment variables. It's always using the default config.
I am using node-config custom environment variables as described here: https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables
Everything is working well when running the app locally. The config by passes the default ones and takes the ones defined in my User variables when set.
Problem
- I start a docker instance with all required Environment variables
set. - I verify the env variables by running
docker exec container_name env
However, the node app still uses the default config, instead of the environment variables.
I am not sure what setup I may be missing.
node-config
Working on Windows OS.
My node app using node-config isn't using docker environment variables. It's always using the default config.
I am using node-config custom environment variables as described here: https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables
Everything is working well when running the app locally. The config by passes the default ones and takes the ones defined in my User variables when set.
Problem
- I start a docker instance with all required Environment variables
set. - I verify the env variables by running
docker exec container_name env
However, the node app still uses the default config, instead of the environment variables.
I am not sure what setup I may be missing.
node-config
node-config
asked Dec 12 '18 at 22:40
SumatanJuniorSumatanJunior
195 bronze badges
195 bronze badges
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03
add a comment |
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03
add a comment |
1 Answer
1
active
oldest
votes
I'm a maintainer of node-config
. I don't test with Docker or Heroku, but this most be an ordering problem. As long as the environment variables are set before require('config')
happens, they will work-- at that point Docker or Heroku doesn't matter. The activity is happening inside the Node.js JavaScript engine at that point.
Try this simple test: Just before your line where you require('config')
, use console.log
or an equivalent to print out the environment variables that you care about. I expect you'll find that when it's not working it's because the environment variables are not set before node-config
is loaded.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53752475%2fnode-config-custom-environment-variables-not-picking-docker-environment-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm a maintainer of node-config
. I don't test with Docker or Heroku, but this most be an ordering problem. As long as the environment variables are set before require('config')
happens, they will work-- at that point Docker or Heroku doesn't matter. The activity is happening inside the Node.js JavaScript engine at that point.
Try this simple test: Just before your line where you require('config')
, use console.log
or an equivalent to print out the environment variables that you care about. I expect you'll find that when it's not working it's because the environment variables are not set before node-config
is loaded.
add a comment |
I'm a maintainer of node-config
. I don't test with Docker or Heroku, but this most be an ordering problem. As long as the environment variables are set before require('config')
happens, they will work-- at that point Docker or Heroku doesn't matter. The activity is happening inside the Node.js JavaScript engine at that point.
Try this simple test: Just before your line where you require('config')
, use console.log
or an equivalent to print out the environment variables that you care about. I expect you'll find that when it's not working it's because the environment variables are not set before node-config
is loaded.
add a comment |
I'm a maintainer of node-config
. I don't test with Docker or Heroku, but this most be an ordering problem. As long as the environment variables are set before require('config')
happens, they will work-- at that point Docker or Heroku doesn't matter. The activity is happening inside the Node.js JavaScript engine at that point.
Try this simple test: Just before your line where you require('config')
, use console.log
or an equivalent to print out the environment variables that you care about. I expect you'll find that when it's not working it's because the environment variables are not set before node-config
is loaded.
I'm a maintainer of node-config
. I don't test with Docker or Heroku, but this most be an ordering problem. As long as the environment variables are set before require('config')
happens, they will work-- at that point Docker or Heroku doesn't matter. The activity is happening inside the Node.js JavaScript engine at that point.
Try this simple test: Just before your line where you require('config')
, use console.log
or an equivalent to print out the environment variables that you care about. I expect you'll find that when it's not working it's because the environment variables are not set before node-config
is loaded.
answered Mar 25 at 14:10
Mark StosbergMark Stosberg
9,2195 gold badges29 silver badges45 bronze badges
9,2195 gold badges29 silver badges45 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53752475%2fnode-config-custom-environment-variables-not-picking-docker-environment-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
sorry this isn't an answer to your problem, but I have this exact issue with Heroku. the custom-environment-variables don't override the default or production json files
– NickW
Jan 29 at 13:03