Laravel deployment

Setup automatic git deployment for your Laravel application hosted on fortrabbit.

Get ready

  1. Have a local development environment running
  2. Local Laravel installation
  3. Know about deployment features
  4. Install the fortrabbit GitHub app with your GitHub account
  5. Completed Laravel setup steps

Initialize Git and add GitHub

Here's an example using Git and GitHub CLI to set up a local repository and connect it to GitHub:

# Setup local git repo
$ git init
$ git add -A
$ git commit -m 'Init'

# GitHub CLI to create/connect remote Git repo
$ gh repo new
# Follow the steps
# Push an existing local repository to github.com
# Add as remote and assign current branch as 'origin'
shell

At the end, the Git repo at GitHub is created and content already pushed. From now on you only need to run git add, git commit, and git push to send code changes to GitHub.

See the git deployment intro for more details on how to connect a local repo to a GitHub remote and enable automatic deployment using the fortrabbit GitHub App.

Connect your GitHub repo with fortrabbit

If you already created an app on fortrabbit, connect the repository through the app settings. If not, create a new app on fortrabbit and set up the deployment:

https://dash.fortrabbit.com/new/app

Choose Laravel as the software preset. Use Git deployment and select the Git repository you created previously.

Found a tpyo?Edit