Answer the question
In order to leave comments, you need to log in
Environment variables in production?
Good afternoon.
For the first time I am trying to put the project correctly on the hoster's server and ran into a misunderstanding where to store my own variables so that they get into the virtual environment of the application or session.
On the local, I created a file in the root of the project .env and in the settings I get my variables from the environment. I also thought about hosting. Only the env with its contents must be configured before deploying the project from the git, and the local env must be registered in the gitignor.
But I saw the following on the forum and again doubted how it was right:
So how do you add .env to your server since it will be in .gitignore – Martins Jun 30 '19 at 0:35
@Martins Server should not be using .env, you should inject those environment variables directly (eg code deployment) – Aamir Adnan Jul 1 '19 at 2:50 pm
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question