- https://cloud.google.com/community/tutorials/run-laravel-on-appengine-standard
- https://orangecat.tw/google-app-engine-app-example-with-laravel/
Doing at cloud shell
composer create-project --prefer-dist laravel/laravel [YOUR-PROJECT-NAME]
cloud shell test run
php artisan serve
vi app.yaml
runtime: php72
env_variables:
## Put production environment variables here.
APP_KEY: YOUR_APP_KEY
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie
- php artisan key:generate --show --> paste into app.yaml
- Modify bootstrap/app.php , adding the following block of code before the return statement.
# [START] Add the following block to `bootstrap/app.php`
/*
|--------------------------------------------------------------------------
| Set Storage Path
|--------------------------------------------------------------------------
|
| This script allows you to override the default storage location used by
| the application. You may set the APP_STORAGE environment variable
| in your .env file, if not set the default location will be used
|
*/
$app->useStoragePath(env('APP_STORAGE', base_path() . '/storage'));
# [END]
- remove dev dependency
composer remove --dev beyondcode/laravel-dump-server
composer remove --dev facade/ignition
- deploy app
gcloud app deploy