Download the PHP package firevel/firevel without Composer
On this page you can find all versions of the php package firevel/firevel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package firevel
About Firevel
Firevel is a modified, serverless version of Laravel 10 designed to work inside Google App Engine PHP 8.2 standard environment, together with Google Firestore as database and cache.
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.
Requirements
Before you start
- Make sure you
gcloud
is initialized usinggcloud init
command. - Make sure you created project at Google Cloud Platform Console and set it on your console using
gcloud config set project PROJECT_ID
. - Login to Google Console find Firesore section and make sure that your project is running on Native mode. If your project is already using Datastore mode you might need to create a new project.
Installation
1) Create a project in the Google Cloud Platform Console
2) Install and initialize (gcloud init
) gcloud command-line tool
3) Create firevel project with composer create-project firevel/firevel
4) Generate your app.yaml
file using php artisan firevel:generate app.yaml
4) Deploy project with gcloud beta 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_CLOUD_PROJECT
and GOOGLE_APPLICATION_CREDENTIALS
.env variables. You might also need to enable App Engine Admin API.
Local Development with Docker and Buildpacks
Building the Image
To replicate the production environment for local development, you can utilize Buildpacks. Use the pack command with specific environment variables:
Once the image is built, it can be integrated with Docker, typically through a docker-compose.yaml
file.
Configuration
You can configure PHP extensions for development mode using the php.local.ini
file. This allows for customized behavior during local development.
Accessing the Container Environment
To execute PHP commands within the container, use the /cnb/lifecycle/launcher
. For instance:
For those looking to utilize Composer within the container, it comes pre-installed. Access it with:
Laravel Tinker
To run Laravel Tinker, execute the following command:
For MacBook users, ensure the TERM
variable is set correctly. As an example:
Differences between Laravel and Firevel.
Firevel is a Laravel 10 after small updates and packages installation:
Usage
You can use Firevel in the same way you use Laravel. Be aware of Firebase limits and Google App Engine limits.
File Storage
By default Firevel running inside App Engine is using Google Cloud Storage file system, and {GOOGLE_CLOUD_PROJECT}.appspot.com/services/{GAE_SERVICE}/storage/
path.
Logging
If you are using app.yaml
generated by firevel:generate app
your logs going to be stored in Stackdriver.
Artisan
To run artisan commands inside serverless containers, install https://github.com/firevel/artisan.
Workers
If you are going to use serverless workers, install https://github.com/firevel/cloud-tasks-queue-driver.
Roadmap
- CI generator as separate package.
- Improved MySQL handling (socket connections + passwordless authentication).
More
- Serverless PHP on App Engine + Cloud Firestore with Firevel
- App Engine documentation
- How Requests are Routed
- Get to know Cloud Firestore
Credits
- Taylor Otwell - for building Laravel.
- SpringboardVR - for allowing this project to happen by providing initial production case.
- Google Cloud - for building great products.
All versions of firevel with dependencies
firevel/firestore Version ^1.0.5
firevel/firestore-cache-driver Version ^1.1.0
firevel/firestore-session-driver Version ^1.0.2
firevel/generator Version ^0.1.0
guzzlehttp/guzzle Version ^7.2
laravel/framework Version ^10.20
laravel/tinker Version ^2.8
spatie/laravel-google-cloud-storage Version ^2.2