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

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?