The laravel application working well in my local.
But when I upload it to Google App Engine, using command gcloud app deploy
. Then it give me error writing logs.
UnexpectedValueException
The stream or file "/srv/storage/logs/laravel.log" could not be opened: failed to open stream: Read-only file system
The code is app.yaml file in root folder of my laravel app.
Copyright 2015 Google Inc. All Rights Reserved.
runtime: php72
api_version: 1
threadsafe: true
runtime_config: document_root: public
handlers: - url: /favicon.ico static_files: public/favicon.ico upload: public/favicon.ico
- url: .* script: auto
env_variables: # Uncomment the following to enable debug mode.
APP_DEBUG: 0
APP_LOG: errorlog APP_KEY: base64:nzd12xL4YtD3fIKYYRc/NGIfA+phk39fGJrvq11UBug= APP_LOG_LEVEL: debug STORAGE_DIR: /tmp
DB_HOST: '' DB_USERNAME: '' DB_PASSWORD: '' DB_DATABASE: ''
CACHE_DRIVER: memcache SESSION_DRIVER: memcache MAIL_DRIVER: 'mail' LOG_DRIVER: 'syslog'
STORAGE_PATH: 'gs://#default#/laravel/storage'
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.
– aynber