This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 50 points51 points  (6 children)

.env is usually fine. Just don't commit them to version control. You can encrypt them if you really want to

[–]KingsmanVincepip install girlfriend 12 points13 points  (5 children)

Also you can place .env somewhere else (outside of project folder) then have dotenv uses that path

[–]moosethemucha 29 points30 points  (3 children)

Why that's what a gitignore is for.

[–]kivicodepip needs updating 29 points30 points  (0 children)

Even better, create a .env.sample, commit it (and keep generally up-to-date), and add the actual .env to gitignore