Supercharge your Laravel Forge account with Bellows
Published on by Eric L. Barnes
Bellows is an intelligent command line utility that sits on top of Laravel Forge to get your site up and running with all of your third-party integrations configured at the speed of light.
Demo
Brief Background
Every time you set up a website, you'll find yourself doing the same thing, over and over again. Laravel Forge makes a lot of this much easier, but you still end up:
-
Updating domain records to point to your server
-
Adding the
run schedule
artisan command -
Securing the site
-
Configuring the mailer
-
Logging into mail provider
-
Adding a new
mail.
domain name -
Verifying
mail.
domain name by updating DNS records again -
Setting
.env
variables
-
-
Configuring the database
-
Logging into DigitalOcean
-
Creating a database
-
Creating a user
-
Copying the user credentials
-
Copying the database config
-
Setting
.env
variables
-
You get the idea, the list goes on.
Is all of this manageable? Sure. Is it automatable? Yes. Bellows can handle all of these tasks for you and more, right from the command line.
What It Does
Bellows walks you through deploying your site for the first time, reading your .env
and installed packages and auto-detecting which services you'd like to configure for your app. If it's unsure about an action, it will ask you (it will never do something without your permission).
Bellows can update your deploy script, add .env
variables, create workers, create daemons, create scheduled jobs, and more. Some examples:
-
If you use Cloudflare, GoDaddy, or DigitalOcean Bellows is able to point your domain to your server and auto-validate any domains for your selected mail provider.
-
If it detects that your app is using Octane, it will create the site as an Octane site and also generate the required daemon.
-
If it detects that you have the Bugsnag package installed, it will ask you if you want to create a Bugsnag project or select an existing one from the list.
-
Using Pusher? Just select your Pusher app from the list and let Bellows set up your
.env
values. -
If Postmark is your mailer, you can choose an existing server and domain or have Bellows create them for you. It'll even automatically verify your new domain if your DNS provider is supported.
Bellows supports many third-party services, and more are being added all the time. Right now the plugin system is closed, but custom plugins are on the roadmap.
Using Bellows
The first time you use Bellows, you'll be entering some API keys as it walks you through launching your site. These are needed to connect to Forge and any third-party services your app needs.
If Bellows needs an API key, it gives you a direct link to retrieve it. Click the link, grab the key, paste it in. On you go.
The second (and third, and fourth, and fifth, and...) time you use Bellows, you'll be flying. It auto-detects as much as possible to allow you to just keep pressing the enter key.
Roadmap
Soon, Bellows will be able to do more than just launch your site.
Deploy
The deploy
command will allow you to push changes to an existing site on Forge in the same way launch
does. Let's say you forgot to add Postmark as your mailer when you launched. No problem. deploy
will configure and add Postmark to your site in no time flat.
Kickoff
The kickoff
command creates and configures a Laravel app according to your custom settings. Do you always install certain packages? Always include that code snippet in your AppServiceProvider
? Always adjust that specific config value? With kickoff
you can go from idea to writing actionable code in 30 seconds or less.
Load Balancers
The launch
command will soon be able to create sites associated with a Forge load balancer. No more creating the same site on multiple servers, just do it in one shot with Bellows.
Get Bellows Today
Supercharge your Laravel workflow, from development to launching and beyond: Buy Now
Eric is the creator of Laravel News and has been covering Laravel since 2012.