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;
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
add a comment |
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
add a comment |
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
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
docker vue.js docker-compose environment-variables dockerfile
asked Mar 25 at 23:23
Ignas DamunskisIgnas Damunskis
7655 silver badges19 bronze badges
7655 silver badges19 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
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
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%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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
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%2f55347794%2fdockerized-vue-app-should-i-use-docker-or-node-env-variables%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