We're thrilled to introduce zero downtime deployments to Laravel Forge, thanks to a seamless first-party integration with Envoyer. Envoyer's zero downtime deployments ensure you avoid even those brief milliseconds of downtime while the server updates your code.
Envoyer is a Laravel product designed to deploy your PHP projects with zero downtime.
Within Forge, it is now incredibly straightforward to link new sites to your Envoyer projects, allowing for seamless deployments without any downtime. Forge will even ensure your server is added to your Envoyer project and SSH access is properly configured. And stay tuned — we'll be rolling out support for existing sites soon!
Getting Started with Forge and Envoyer
To kick things off, you'll need active subscriptions for both Laravel Forge and Envoyer. Once you’re set up, navigate to your Envoyer dashboard and create a new API token. At a minimum, Forge requires the following scopes:
-
deployments:create
-
projects:create
-
servers:create
To future-proof the integration, consider providing Forge with additional access permissions. You can update your Envoyer’s API token in Forge at any point.
Next, it’s time to link Forge with your Envoyer API token. Navigate to your account settings in Forge and click on the Envoyer navigation item.
When creating a new site in Forge, you’ll notice a new option labeled “Configure with Envoyer”. Toggle this option to reveal a dropdown menu, where you can either select an existing Envoyer project or create a brand new one.
To deploy your Envoyer project within Forge, simply click the “Deploy Now” button, just as you would with any other site in Forge. The “Deployment Trigger URL” is also available for use in a CI environment.
Additionally, Forge has been updated to align perfectly with Envoyer projects:
- Commands are executed from the
/current
directory. - The Environment panel will display a read-only version of the
.env
file. Continue to use Envoyer to manage your environment file, especially since it may need to be synchronized across multiple servers. - The site’s Packages panel is disabled to ensure the
auth.json
file remains intact through subsequent deployments.
We are delighted to present this new integration and are committed to its continuous improvement. In the near future, we’ll be introducing additional features, including the capability to connect existing sites to Envoyer.
We hope you enjoy this streamlined, efficient deployment process as much as we do!