@kitman, of course, you don't add .env to git. You will create a .env file with cmd command and then will paste the code from your local .env and then update it according to the production settings.
Jul 3, 2019
3
Level 3
.ENV DEPLOYMENT FOR PRODUCTION SERVER
hI,
I want to ask how do people deploy there .env files on production server
- using ci/cd tool to cpy .env.example .env
- devops login the server and manual copy and rename form .env.example to .env
- Others ways
If using the 1 way it will have security issues because we are uploading to DB password and stuff to git, how to solve that problem.
If using the 2 way does that mean as a programmer everytime I create add/change a new variable(eg: third party api link) I have to tell the devops to add one on the production server, and also if I have multiple servers then I have to manual do it couple times which does not make much sense plus if the programmer forgot to tell the devops about it will create a problem as well ?
Please or to participate in this conversation.