Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Adds bug fix for laravel deployment #700

Merged
merged 2 commits into from
Feb 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions tutorials/run-laravel-on-appengine-standard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ from laravel.com.
runtime: php72

env_variables:
# Put production environment variables here.
LOG_CHANNEL: stackdriver
## Put production environment variables here.
APP_KEY: YOUR_APP_KEY
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
Expand Down Expand Up @@ -81,6 +80,12 @@ from laravel.com.
*/
$app->useStoragePath(env('APP_STORAGE', base_path() . '/storage'));

1. Finally, remove the `beyondcode/laravel-dump-server` composer dependency. This is a
fix for an error which happens as a result of Laravel's caching in
`bootstrap/cache/services.php`.

composer remove --dev beyondcode/laravel-dump-server

1. Run the following command to deploy your app:

gcloud app deploy
Expand Down Expand Up @@ -136,8 +141,7 @@ Laravel, you need to manually add the `DB_SOCKET` value to
runtime: php72

env_variables:
# Put production environment variables here.
APP_LOG: errorlog
## Put production environment variables here.
APP_KEY: YOUR_APP_KEY
APP_STORAGE: /tmp
CACHE_DRIVER: database
Expand Down Expand Up @@ -202,6 +206,16 @@ You can write logs to Stackdriver Logging from PHP applications by using the Sta
'level' => 'debug',
],

1. Modify your `app.yaml` file to set the `LOG_CHANNEL` environment variable to
the value `stackdriver`:

runtime: php72

env_variables:
LOG_CHANNEL: stackdriver
# The rest of your environment variables remain unchanged below
# ...

1. Now you can log to Stackdriver Logging anywhere in your application!

Log::info("Hello Stackdriver! This will show up as log level INFO!");
Expand Down