In addition to standard Laravel Framework benefits it offers:
- Simple, serverless setup.
- Downscaling to zero.
- Micro-service friendly design.
- Free tier eligibility.
- Capacity to deal with high loads.
Create a project in the Google Cloud Platform Console.
Create firevel project with:
composer create-project firevel/firevel
- Deploy project with:
gcloud app deploy
Firevel does not require any credentials while running inside App Engine. If you like to run it locally you will also need to set
GOOGLE_APPLICATION_CREDENTIALS .env variables. If you prefer to use
git clone https://github.com/firevel/firevel.git, you should also run
php artisan firevel:generate:app to generate your
Laravel and Firevel.Differences between
Firevel is a Laravel 5.8 after small updates and packages installation:
- Firestore Session driver
- Firestore Cache driver
- Stack driver log channel
- Laravel Firestore wrapper
You should also replace Eloquent models with Firequent, by using
use Firevel\Firequent\Model; instead of
use Illuminate\Database\Eloquent\Model; inside a model class. Keep in mind that Firequent is in beta and support only basic queries.
By default Firevel running inside App Engine is using Google Cloud Storage file system, and
You can run a simple CI process with
gcloud builds submit --config cloudbuild.yaml --substitutions _APP_KEY= with your production API key at the end. You can also connect it with your existing repository but remember about setting
_APP_KEY in substitution variables.
You also must grant App Engine access to the Cloud Build service account.
- Serverless PHP on App Engine + Cloud Firestore with Firevel
- App Engine documentation
- How Requests are Routed
- Get to know Cloud Firestore