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;








1















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.










share|improve this question






















  • 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


















1















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.










share|improve this question






















  • 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














1












1








1








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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


















  • 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













1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    1














    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.






    share|improve this answer



























      1














      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.






      share|improve this answer

























        1












        1








        1







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        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


















            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.



















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현