Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ben Sampson:
Creating a decent Laravel deploy script
Jun 15, 2018 @ 13:45:38

Ben Sampson has posted a quick guide on his site sharing a deployment script for Laravel applications he's found useful.

A good deploy script can save you time and speed up your application, and it only takes a few minutes to set one up.

I have a standard deploy script which I use for almost all of my projects, which I'm going to break down and share with you.

Note: This article assumes that you're using Laravel Forge. If you're not, many of the settings will be applicable, but the setup steps may be a bit different.

He starts with a brief description of what a deployment script is and goes through the functionality he has included in his:

  • switching the site to maintenance mode
  • clearing caches
  • clearing and optimizing routes
  • clearing and optimizing the configuration
  • clearing expired password reset tokens
  • compiling front-end assets

He puts it all together into a single file that's then included in the Forge deployment process. He doesn't provide other instruction as to how to use this script with another deployment method but it can potentially be used anywhere a bash script could.

tagged: laravel deployment script steps laravelforge tutorial

Link: https://sampo.co.uk/blog/creating-a-decent-laravel-deploy-script

TutsPlus.com:
Deploy PHP Web Applications Using Laravel Forge
Mar 20, 2018 @ 11:09:46

The TutsPlus.com site has posted a new tutorial showing you how to make use of the Laravel Forge service to deploy your PHP applications. Laravel Forge provides the configuration and automation tools to deploy your applications to servers on your own accounts (like DigitalOcean or AWS).

Developers love to automate things—for every process between development and production, they are keen to have a script that makes their workflow easier. This is also the case with deployment. The process of pushing the final build and deploying the app should be as easy as pressing a Deploy now button, but that is not what happens most of the time.

[...] Don't let the Laravel brand name mislead you. Apart from Laravel, you can use the service to host WordPress, Symphony, Statamic, or any other web project as long as it's PHP. Personally, I like Laravel Forge for its simplicity and ease of getting used to.

In this tutorial, I am going to take you through the steps to hook Laravel Forge with AWS and explore what it has to offer.

The tutorial starts with an overview of the service and what kind of setup and configuration the resulting servers have (by default). It then covers the various configuration options available and walks you through the process of setting it up with your AWS account. It also includes details about the server management system Forge provides, site management, SSH key addition and PHP/MySQL configuration. A few other helpful hints are also tossed in at the end covering task scheduling, daemons, monitoring and network/firewall configuration.

tagged: application deployment laravelforge laravel tutorial aws introduction

Link: https://code.tutsplus.com/tutorials/deploy-php-web-application-using-laravel-forge--cms-30329

SitePoint PHP Blog:
Setting up PHP 7 Servers with Laravel Forge and DigitalOcean
Jan 07, 2016 @ 11:11:38

The SitePoint PHP blog has another new article from editor Bruno Skvorc showing you how to set up PHP 7 servers in two different ways: one the DigitalOcean platform and the other using the Laravel Forge service.

In this quick guide, we’ll cover two ways to bring a PHP 7 server online on DigitalOcean – a popular VPS provider. We’ll use two approaches, the latter of which will be applicable to any Ubuntu installation whereas the former will only work on DigitalOcean.

He starts with a brief description of what Laravel Forge is for those not familiar with it and how to use it to set up your new server instance. Screenshots of the interface are included showing the setup of the instance, backups, configuration of the server and how to link it to a repository. Then he gets into the more "manual" installation, working with a simple low-tier DigitalOcean droplet to secure and configure it with similar kinds of features: PHP 7 installed and working, Nginx and a fresh checkout of the repository.

tagged: php7 server tutorial setup laravelforge digitalocean deploy repository

Link: http://www.sitepoint.com/setting-up-php-7-servers-with-laravel-forge-and-digitalocean/