Laravel deployment
Published
Updated
Push the Laravel code to GitHub and connect the repository to a fortrabbit app. Every push to the connected branch then builds and deploys Laravel, with migrations after each deployment.
Get ready
- Have a local development environment running
- Local Laravel installation
- Know about deployment features
- Install the fortrabbit GitHub app with your GitHub account
- 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'
The repository now exists on GitHub with the code. From here on, git add, git commit and git push send changes. See the deployment intro.
Connect your GitHub repo with fortrabbit
Connect the repository in the settings of an existing app, or create a new one:
Choose Laravel as the software and the repository for Git deployment. Adjust the build settings if needed.