What is the best approach to storing and deploying environment variable files to Node.js if they are excluded from version control?What is the best way to set an environment variable in .bashrc?Strange wait on static files from node.js express behind nginx proxyWhen standing up a server (Debian for instance) what are ways to make the environment variables persistent and available to PHP?What are the best practices for exporting secrets (passwords, keys) to the environment of systemd managed services?What are the rules regarding casing of values for environment variable USERNAME in Windows?

How are one-time password generators like Google Authenticator different from having two passwords?

Is a vertical stabiliser needed for straight line flight in a glider?

Why was this sacrifice sufficient?

Why can't RGB or bicolour LEDs produce a decent yellow?

Renting a house to a graduate student in my department

Noob at soldering, can anyone explain why my circuit won't work?

On studying Computer Science vs. Software Engineering to become a proficient coder

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Does a member have to be initialized to take its address?

What is the best way for a skeleton to impersonate human without using magic?

Can I do brevets (long distance rides) on my hybrid bike? If yes, how to start?

Is Simic Ascendancy triggered by Awakening of Vitu-Ghazi?

How can I answer high-school writing prompts without sounding weird and fake?

Early arrival in Australia, early hotel check in not available

We are two immediate neighbors who forged our own powers to form concatenated relationship. Who are we?

Make all the squares explode

What food production methods would allow a metropolis like New York to become self sufficient

Why do Thanos's punches not kill Captain America or at least cause some mortal injuries?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

Understanding basic photoresistor circuit

Can 'sudo apt-get remove [write]' destroy my Ubuntu?

Drawing Quarter-Circle

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

Why was the Ancient One so hesitant to teach Dr. Strange the art of sorcery?



What is the best approach to storing and deploying environment variable files to Node.js if they are excluded from version control?


What is the best way to set an environment variable in .bashrc?Strange wait on static files from node.js express behind nginx proxyWhen standing up a server (Debian for instance) what are ways to make the environment variables persistent and available to PHP?What are the best practices for exporting secrets (passwords, keys) to the environment of systemd managed services?What are the rules regarding casing of values for environment variable USERNAME in Windows?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















Firstly a tiny bit of background: I have a MEAN stack application running on Bitnami Ubuntu, on AWS. I have a .env file with API keys etc in it, that is excluded from my repo using .gitignore.



I understand the main approaches to initialising the application to pick up the .env file, but none of the articles which describe these comment on (1) what options are there to deploy your .env to your server if it's not in your git repo, and (2) if it's not stored in version control, where might it be best to keep that .env file so that it's secure?



Others experiences of this would be very valuable. I couldn't find anything similar on Google, SO or SF.



Thanks.










share|improve this question






















  • The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

    – HBruijn
    May 1 at 14:26












  • This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

    – Michael Hampton
    May 1 at 16:17











  • I've got more of a handle on what to search for now. Thank you both very much.

    – Mandrake... Mandrake.
    May 2 at 8:56

















0















Firstly a tiny bit of background: I have a MEAN stack application running on Bitnami Ubuntu, on AWS. I have a .env file with API keys etc in it, that is excluded from my repo using .gitignore.



I understand the main approaches to initialising the application to pick up the .env file, but none of the articles which describe these comment on (1) what options are there to deploy your .env to your server if it's not in your git repo, and (2) if it's not stored in version control, where might it be best to keep that .env file so that it's secure?



Others experiences of this would be very valuable. I couldn't find anything similar on Google, SO or SF.



Thanks.










share|improve this question






















  • The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

    – HBruijn
    May 1 at 14:26












  • This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

    – Michael Hampton
    May 1 at 16:17











  • I've got more of a handle on what to search for now. Thank you both very much.

    – Mandrake... Mandrake.
    May 2 at 8:56













0












0








0








Firstly a tiny bit of background: I have a MEAN stack application running on Bitnami Ubuntu, on AWS. I have a .env file with API keys etc in it, that is excluded from my repo using .gitignore.



I understand the main approaches to initialising the application to pick up the .env file, but none of the articles which describe these comment on (1) what options are there to deploy your .env to your server if it's not in your git repo, and (2) if it's not stored in version control, where might it be best to keep that .env file so that it's secure?



Others experiences of this would be very valuable. I couldn't find anything similar on Google, SO or SF.



Thanks.










share|improve this question














Firstly a tiny bit of background: I have a MEAN stack application running on Bitnami Ubuntu, on AWS. I have a .env file with API keys etc in it, that is excluded from my repo using .gitignore.



I understand the main approaches to initialising the application to pick up the .env file, but none of the articles which describe these comment on (1) what options are there to deploy your .env to your server if it's not in your git repo, and (2) if it's not stored in version control, where might it be best to keep that .env file so that it's secure?



Others experiences of this would be very valuable. I couldn't find anything similar on Google, SO or SF.



Thanks.







node.js environment-variables






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 1 at 13:12









Mandrake... Mandrake.Mandrake... Mandrake.

1




1












  • The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

    – HBruijn
    May 1 at 14:26












  • This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

    – Michael Hampton
    May 1 at 16:17











  • I've got more of a handle on what to search for now. Thank you both very much.

    – Mandrake... Mandrake.
    May 2 at 8:56

















  • The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

    – HBruijn
    May 1 at 14:26












  • This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

    – Michael Hampton
    May 1 at 16:17











  • I've got more of a handle on what to search for now. Thank you both very much.

    – Mandrake... Mandrake.
    May 2 at 8:56
















The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

– HBruijn
May 1 at 14:26






The idea is that you use versioning for maintaining your code base and ”configuration management” to govern which release should be deployed where and with what settings.

– HBruijn
May 1 at 14:26














This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

– Michael Hampton
May 1 at 16:17





This depends on how you're deploying your app. But there is always somewhere to put the environment variables.

– Michael Hampton
May 1 at 16:17













I've got more of a handle on what to search for now. Thank you both very much.

– Mandrake... Mandrake.
May 2 at 8:56





I've got more of a handle on what to search for now. Thank you both very much.

– Mandrake... Mandrake.
May 2 at 8:56










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
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%2fserverfault.com%2fquestions%2f965420%2fwhat-is-the-best-approach-to-storing-and-deploying-environment-variable-files-to%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • 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%2fserverfault.com%2fquestions%2f965420%2fwhat-is-the-best-approach-to-storing-and-deploying-environment-variable-files-to%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 write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?