Posts tagged with deploy

🚀 Deploying a Laravel Project on Forge with Reverb WebSockets | Real-Time Setup Tutorial

– youtu.be - submitted by Bert De Swaef

Want to deploy your Laravel project on Forge with real-time WebSockets using Reverb? In this step-by-step tutorial, we’ll walk you through setting up Laravel Forge, configuring your server, and integrating Reverb for real-time communication. Whether you're building a chat app, notifications system, or live updates, this guide will help you get everything running smoothly.

Read more [youtu.be]

Join 9,000+ developers

Every month, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

Automatically detect broken links after a deploy

– ohdear.app

You can use the Oh Dear! API to automatically perform health checks on your app after a deploy.

You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.

Read more [ohdear.app]

Verify that your site is still online after a deploy

– ohdear.app

At the Oh Dear blog, my colleague Mattias explains how to use our service to verify that your site is still online after a deploy.

You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.

Read more [ohdear.app]

Setting up Laravel Horizon with Forge and Envoyer

Dries Vints, maintainer of Laravel.io, posted a step-by-step guide on how to get started with Laravel Horizon on a Forge provisioned server.

I recently installed Horizon for Laravel.io and while it wasn’t that hard to install, I still had to figure some things out. Since this was the first time setting everything up I thought I’d write up the steps to take to get started with Horizon and set everything up with Forge and Envoyer.

https://medium.com/@driesvints/laravel-horizon-with-forge-and-envoyer-82a7e819d69f

Read more

How to set up your Laravel application for zero-downtime deploys

On his blog Matt Stauffer published a new post explaining the steps required to deploy your app without any downtime.

The reason you're getting zero-downtime deploy from these tools is because the entire deploy process—clone, composer install, etc.—doesn't happen in the directory that is currently serving your site. Instead, each new release gets its own separate "release" directory, all while your site is still being served from its current "release" directory.

https://mattstauffer.co/blog/how-to-set-up-your-laravel-application-for-zero-downtime-envoyer-capistrano-deploys

In my own projects I handle these capistrano like deploys using a custom Envoy script: https://github.com/spatie/blender/blob/master/Envoy.blade.php

Read more

Run tasks locally with Envoy

Envoy is an easy to use task runner created by master artisan Taylor Otwell. It offers a simple blade-like syntax to create tasks. If you're not familiar with it, you can watch this free Laracasts-video. Chris Fidao recently showed, in his excellent Servers For Hackers newsletter, how you can create a light version of Capistrano with Envoy.

Up until a few hours ago a task could only run via ssh. But now that this pull request has been merged, you can also use envoy to locally run commands.

Read more

Automating Laravel deployments using Capistrano

Capistrano is a server automation and deployment tool. It makes a whole bunch of servers simultaneously perform actions. This could be deploying our application, or clearing their cache.

Capistrano tells each of our servers to pull the latest branch from Git, perform any necessary build steps, and deploy the application on itself. Setting up this process is what we'll be detailing.

https://www.airpair.com/laravel/posts/automating-laravel-deployments-using-capistrano

If you want to use something simpler, take a look at Deployer.

Read more

Easy deployments for php projects

Let's talk a bit about deployments.

All the new projects I work on are hosted on servers that are provisioned by Forge. Forge has a quick deploy feature that allows you to pull the lastest master-commit onto the server, install composer dependencies, run migrations and so on.

It has two main drawbacks:

  • you can't see any output of the deployment script in your terminal
  • you can't do some stuff locally on your computer
To solve these points I'm switching from Forge's quick deploy feature to Deployer.
Deployer is a deployment tool written in PHP, it's simple and functional. Deploy your code to all servers you want, it supports deploy via copy, or via VCS (like git), or via rsync. Run your tasks on all your servers, or use our recipes of common tasks for Symfony, Laravel, Zend Framework and Yii.
You can install Deployer via composer. To use Deployer a deploy.php file must be added to your project. This file describes your deployment process. No worries, you can write it in php using a very clean and readable syntax. The documention on how to write the deploy.php-file is a bit vague at this point, but you'll get a good idea of how things work by taking a look at my deploy.php-file.

To run deployer you'll use this command:

[code lang="bash"] dep



I've made a bash alias that uses the name of the git branch you're currently on:

[code lang="bash"]
alias deploy='dep deploy $(git symbolic-ref --short HEAD)'

Now deploying a branch is as easy as just typing "deploy" when standing on a git repo in your terminal. This is a much nicer way to handle deployments. What I really like is that, now a deploy.php stored in the git repo, the deployment process is also versioned.

If you find Deployer doesn't meet your needs, Rocketeer, Phing and Capistrano are some more advanced alternatives. Envoy is nice too, but I haven't found a way to run stuff locally.

Read more