Dockerized Vue app - should I use docker or node env variables?Set environment variables on Mac OS X LionShould I use Vagrant or Docker for creating an isolated environment?Different env-file but same yml with Docker Compose?How do I pass environment variables to Docker containers?Kubernetes equivalent of env-file in DockerPassing env variables to DOCKER Spring BootMultiple Docker build args from docker-compose .env fileDeploying to different environments with different env variables on elastic beanstalk from the same git repositoryEnvironment variables vue js, azure kubernetes service, docker containersPass ENV variable with docker-compose.yml at runtime to Dockerfile

Can you cast the Shape Water spell without an existing obvious pool of water?

How does one acquire an undead eyeball encased in a gem?

Why AI became applicable only after Nvidia's chips were available?

Did the Ottoman empire suppress the printing press?

Why does the Antonov AN-225 not have any winglets?

When an electron changes its spin, or any other intrinsic property, is it still the same electron?

Did depressed people far more accurately estimate how many monsters they killed in a video game?

What was the profession 芸者 (female entertainer) called in Russia?

How to evaluate the performance of open source solver?

Non-Chromatic Orchestral Instruments?

Do injective, yet not bijective, functions have an inverse?

What could cause the sea level to massively decrease?

When do flights get cancelled due to fog?

Estimates on number of topologies on a finite set

How many Jimmys can fit?

Publishing papers seem natural to many, while I find it really hard to think novel stuff to pursue till publication. How to cope up with this?

How should I ask for a "pint" in countries that use metric?

Generalized Behrend version for Grothendieck-Lefschetz trace formula

How insert vertex in face?

What is a writing material that persists forever or for a long time?

How to properly translate "kusura bakmasınlar" ("the fault should not be looked at") to Russian?

primary key constraint Sorting

Write a function

Would a Nikon FG 20 film SLR camera take pictures without batteries?



Dockerized Vue app - should I use docker or node env variables?


Set environment variables on Mac OS X LionShould I use Vagrant or Docker for creating an isolated environment?Different env-file but same yml with Docker Compose?How do I pass environment variables to Docker containers?Kubernetes equivalent of env-file in DockerPassing env variables to DOCKER Spring BootMultiple Docker build args from docker-compose .env fileDeploying to different environments with different env variables on elastic beanstalk from the same git repositoryEnvironment variables vue js, azure kubernetes service, docker containersPass ENV variable with docker-compose.yml at runtime to Dockerfile






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have dockerized vue.js application and would like to know if I should store env variables inside docker, Vue config or other place?



What is the best practice for it? I hardly see the difference since I would only have 2 environments (dev and prod)..










share|improve this question




























    1















    I have dockerized vue.js application and would like to know if I should store env variables inside docker, Vue config or other place?



    What is the best practice for it? I hardly see the difference since I would only have 2 environments (dev and prod)..










    share|improve this question
























      1












      1








      1








      I have dockerized vue.js application and would like to know if I should store env variables inside docker, Vue config or other place?



      What is the best practice for it? I hardly see the difference since I would only have 2 environments (dev and prod)..










      share|improve this question














      I have dockerized vue.js application and would like to know if I should store env variables inside docker, Vue config or other place?



      What is the best practice for it? I hardly see the difference since I would only have 2 environments (dev and prod)..







      docker vue.js docker-compose environment-variables dockerfile






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 23:23









      Ignas DamunskisIgnas Damunskis

      7655 silver badges19 bronze badges




      7655 silver badges19 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          1














          vue supports .env file:
          from vue-cli docs




          You can specify env variables by placing the following files in your
          project root:



          .env # loaded in all cases




          just throw it in your vue root directory.



          caution -




          Only variables that start with VUE_APP_ will be statically embedded
          into the client bundle




          (ie inside the vue app, via process.env)



          now, if you need other processes rather then the vue app inside the container to know those env files, you may specify the path to that env in the env_file: path/to/.env option in the docker-compose:



          https://docs.docker.com/compose/compose-file/#envfile






          share|improve this answer

























          • Yes but in this case they would not share same env files right? Different roots

            – Ignas Damunskis
            Mar 26 at 6:59











          • edited. if it is still not clear let me know

            – Efrat Levitan
            Mar 26 at 8:15










          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%2f55347794%2fdockerized-vue-app-should-i-use-docker-or-node-env-variables%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














          vue supports .env file:
          from vue-cli docs




          You can specify env variables by placing the following files in your
          project root:



          .env # loaded in all cases




          just throw it in your vue root directory.



          caution -




          Only variables that start with VUE_APP_ will be statically embedded
          into the client bundle




          (ie inside the vue app, via process.env)



          now, if you need other processes rather then the vue app inside the container to know those env files, you may specify the path to that env in the env_file: path/to/.env option in the docker-compose:



          https://docs.docker.com/compose/compose-file/#envfile






          share|improve this answer

























          • Yes but in this case they would not share same env files right? Different roots

            – Ignas Damunskis
            Mar 26 at 6:59











          • edited. if it is still not clear let me know

            – Efrat Levitan
            Mar 26 at 8:15















          1














          vue supports .env file:
          from vue-cli docs




          You can specify env variables by placing the following files in your
          project root:



          .env # loaded in all cases




          just throw it in your vue root directory.



          caution -




          Only variables that start with VUE_APP_ will be statically embedded
          into the client bundle




          (ie inside the vue app, via process.env)



          now, if you need other processes rather then the vue app inside the container to know those env files, you may specify the path to that env in the env_file: path/to/.env option in the docker-compose:



          https://docs.docker.com/compose/compose-file/#envfile






          share|improve this answer

























          • Yes but in this case they would not share same env files right? Different roots

            – Ignas Damunskis
            Mar 26 at 6:59











          • edited. if it is still not clear let me know

            – Efrat Levitan
            Mar 26 at 8:15













          1












          1








          1







          vue supports .env file:
          from vue-cli docs




          You can specify env variables by placing the following files in your
          project root:



          .env # loaded in all cases




          just throw it in your vue root directory.



          caution -




          Only variables that start with VUE_APP_ will be statically embedded
          into the client bundle




          (ie inside the vue app, via process.env)



          now, if you need other processes rather then the vue app inside the container to know those env files, you may specify the path to that env in the env_file: path/to/.env option in the docker-compose:



          https://docs.docker.com/compose/compose-file/#envfile






          share|improve this answer















          vue supports .env file:
          from vue-cli docs




          You can specify env variables by placing the following files in your
          project root:



          .env # loaded in all cases




          just throw it in your vue root directory.



          caution -




          Only variables that start with VUE_APP_ will be statically embedded
          into the client bundle




          (ie inside the vue app, via process.env)



          now, if you need other processes rather then the vue app inside the container to know those env files, you may specify the path to that env in the env_file: path/to/.env option in the docker-compose:



          https://docs.docker.com/compose/compose-file/#envfile







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 8:14

























          answered Mar 25 at 23:32









          Efrat LevitanEfrat Levitan

          1,4821 gold badge3 silver badges17 bronze badges




          1,4821 gold badge3 silver badges17 bronze badges












          • Yes but in this case they would not share same env files right? Different roots

            – Ignas Damunskis
            Mar 26 at 6:59











          • edited. if it is still not clear let me know

            – Efrat Levitan
            Mar 26 at 8:15

















          • Yes but in this case they would not share same env files right? Different roots

            – Ignas Damunskis
            Mar 26 at 6:59











          • edited. if it is still not clear let me know

            – Efrat Levitan
            Mar 26 at 8:15
















          Yes but in this case they would not share same env files right? Different roots

          – Ignas Damunskis
          Mar 26 at 6:59





          Yes but in this case they would not share same env files right? Different roots

          – Ignas Damunskis
          Mar 26 at 6:59













          edited. if it is still not clear let me know

          – Efrat Levitan
          Mar 26 at 8:15





          edited. if it is still not clear let me know

          – Efrat Levitan
          Mar 26 at 8:15








          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%2f55347794%2fdockerized-vue-app-should-i-use-docker-or-node-env-variables%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

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript