I have the above error in my API. I am using Laravel version 8 and I deployed the API on the Google Cloud App Engine.
I followed the directions of this tutorial.
I am trying to store a generated file in the /tmp
folder and upload it to Google Cloud Storage.
Following the tutorial to Set up Stackdriver Logging and Error Reporting
but I got
There is no existing directory at ".../storage/logs" and it could not be created: Read-only file system
Please I have very little DevOps knowledge and I appreciate any help you can offer.
This is my app.yaml
file
runtime: php73
env_variables:
## Put production environment variables here.
LOG_CHANNEL: stackdriver
APP_KEY: my_app_key
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie
In my filesystems.php
file I set the symbolic link to the /tmp
folder
'links' => [
public_path('storage') => storage_path('/tmp'),
],
and this is my composer.json file
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"ext-json": "*",
"barryvdh/laravel-dompdf": "^0.9.0",
"dompdf/dompdf": "^1.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"google/cloud-error-reporting": "^0.18.3",
"google/cloud-logging": "^1.21",
"google/cloud-storage": "^1.23",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-install-cmd": [
"composer dump-autoload",
"@php artisan config:clear",
"@php artisan config:cache"
]
}
}