Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lchogan's avatar

Envoyer deploy scripts

I'm new to Envoyer but have been using Forge/DO for hosting for a while. I set up Envoyer and deployed for the first time last night. It went well except I had some issues with queues where I had to restart the queue a few times before it would take. After deploy I encountered a number of reflection errors where a listener could not be found. After the second queue deletion and creation emails started firing (mailgun) but a bunch of duplicate emails were sent.

I have a few questions:

Do I need to recreate the queue worker every time I deploy or is a php artisan queue:restart enough? Has anyone had similar issues with queues and an envoyer/forge setup? I'm trying to wrap my head around what types of deploy hooks I need to create. Does anyone have a kind of vanilla Laravel/Forge setup to reference? My plan right now is to include the following commands in the before activate new release hook. Can anyone give me some feedback here? Is this enough to avoid queue issues? Also, wouldn't there technically be a moment where the database is updated but the new release isn't live?

cd {{release}} 
composer dump-autoload -o 
php artisan clear-compiled 
php artisan cache:clear 
php artisan view:clear 
php artisan queue:restart 
php artisan migrate --force

Thanks

0 likes
0 replies

Please or to participate in this conversation.