Laravel Forge - Using Recipes

Posted on July 09, 2014 | By Matt Stauffer


Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.

Forge comes with a lot of built-in functionality, but what if you want to make some changes on your own? You can always SSH into your servers to make individual changes, but some times there are changes you want to make on a regular basis, or to every one of your servers.

To address this need--regularly running the same, pre-written script across one or many servers--Forge has the concept of a Recipe. Let's try one out.

Step 1: Find a recipe

Visit Forge Recipes and find a recipe you like. We'll be using artisangoose's recipe "Install ElasticSearch" for our demo. Select all of the content of the recipe and copy it to your clipboard.

ElasticSearch Recipe

Step 2: Add the recipe

Go to the Recipes page on Forge, and add the recipe.

Add Recipe

Step 3: Run the recipe

You'll now see your recipe at the bottom of this page in the "Your Recipes" section.

Your Recipes

Click the green "play" button to show a popup of all of your servers; check the servers you want to run the script on, press the "Run" button, and that's it!

Run Recipe

Once the recipe is finished running, Forge will email you the results.

Ter afsluiting

Now you can create your own arsenal of readymade recipes and run them at your will on your server(s). Once the collection of recipes at ForgeRecipes really grows, there's a ton of potential for these recipes to be the means by which we install and update features that Forge doesn't manage out of the box.

That's it! Enjoy!


Comments? I'm @stauffermatt on Twitter


Tags: forge  •  laravel  •  recipes