I'm using Laravel 5.4, Envoyer and Forge. Every time I deploy master branch on Envoyer, my .env file gets deleted. It has no content.
What should I do? Is it maybe my configuration faulty?
Let's breakdown the way Envoyer works:
/releases
./path/to/project/current
from /path/to/project/releases/[first release folder]
to /path/to/project/releases/[second release folder
.When a new version is deployed, it does a fresh clone of the git repository. Unless you have changed your .gitignore, your .env file is NOT tracked in git so is never in the new folder.
By using the environment capability built-in to Envoyer, this places an .env file here /path/to/project/.env
and symlinks from /path/to/project/.env
to /path/to/project/current/.env
.