Zero downtime deployments with Laravel Forge and Envoyer
/current
directory..env
file. Continue to use Envoyer to manage your environment file, especially since it may need to be synchronized across multiple servers.auth.json
file remains intact through subsequent deployments.releases
or current
. This is essential in allowing Envoyer to create these directories during the project’s installation on your server.
Next, access the Envoyer dashboard and navigate to the relevant project. Within the project settings, select “Import Forge Server”, then choose the appropriate server and site before clicking “Import Server.”
.env
file in the site directory on the server.
/current
.
Your site should still be accessible, but the old version is still being served. To address this, navigate to the “Settings” panel in Forge and prefix the web directory with /current
. For example, if your site’s web directory is currently /public
, update it to /current/public
. Doing so will instruct Nginx to serve your application from /home/forge/example.com/current/public
– the location where Envoyer has installed the latest version of your application.
.env
file, along with the releases
, current
, and storage
directories. After ensuring you have backed up anything you need, you may remove everything else, including any dotfiles and directories such as .git
, .gitattributes
, etc.
Now that the web directory includes /current
, Forge will recognize your site as being managed by Envoyer in the “Envoyer” panel. You can now link Forge and Envoyer together by selecting the relevant project from the project list.
/current
directory, you should update your scheduler, queue workers, and any daemons to ensure they are running from the correct path.