Build a Staging Server

0
Language

Level

Beginner

Access

Paid

Certificate

Paid

Once your application reaches a certain size, it might prove useful to prepare a staging server. With this setup, all new features and additions would first be deployed to a testing branch for your team (or yourself). Only after you’ve reviewed and approved the changes would the code then be deployed to production.

In this series, we’ll use Laravel Forge, Hover, and Cloudflare to build and configure a staging server from scratch. We’ll also discuss a few key gotchas you might run into.

Add your review

Deploy Your Website

Before we build a staging site, let’s first deploy an example website and hook it up to an existing domain I own. Luckily, Laravel Forge makes this a cinch.

Make a Staging Site

The next step is to build a staging site through Laravel Forge. We’ll also need to update our domain’s DNS to point all staging.laravelscreencasts.com requests to the server’s IP address.

Staging Workflow

Now that we have a staging site, we can review a basic workflow you might follow when preparing a new feature. We’ll create a new feature branch, commit some changes, merge them into the staging branch, review them on the staging server, and then finally merge and deploy the approved feature to production.

Password-Protect Your Staging Site

At the moment, anyone can access our staging site. Let’s limit it to only members of our staff by applying basic authentication with nginx and the htpasswd utility.

Cache Gotchas

If you maintain both your production and staging sites on the same server, it’s possible that you’ll run into caching or queue-related issues. For example, if using a ram-based cache driver, to avoid unwanted collisions, please ensure that the cache prefix for each site is unique.

Free SSL and Better Security With Cloudflare

In this episode, we’ll filter all incoming traffic through Cloudflare’s servers. This will allow us to activate any number of helpful features, including free SSL, page rules, Brotli compression, mobile performance improvements, and more.

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Build a Staging Server”

×

    Your Email (required)

    Report this page
    Build a Staging Server
    Build a Staging Server
    LiveTalent.org
    Logo
    LiveTalent.org
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.