问题描述
当我在本地工作时,一切正常.但是当我在Google Cloud上部署时,会出现此错误
While I work locally, everything works fine. But when I deploy on Google Cloud I have this error
我试图从我的终端上运行它.我正在使用Windows PC和Vscode
I have tried to run this from my terminal. I am using window PC and Vscode
chmod -R 775引导程序/缓存
chmod -R 775 bootstrap/cache
运行此命令时,它将返回
When I run this, it returns
我也尝试过这种方法
"post-install-cmd": [
"chmod -R 775 storage",
"chmod -R 775 bootstrap/cache",
"php artisan optimize:clear"
]
我不知道该如何解决.我需要帮助
I don't know how to solve this. I need help
推荐答案
Google Cloud是只写文件系统.对于需要由应用程序写入的目录,您将需要进行一些修改.
Google Cloud is a write only filesystem. For directories which need to be written into by the application, you will need to make some modifications.
请参阅 https://cloud.google.com/community/tutorials/run-laravel-on-appengine-standard 并记下deploy部分下的第1步和第3步,该步骤将 APP_STORAGE
路径设置为/tmp,以便可写.
Please see https://cloud.google.com/community/tutorials/run-laravel-on-appengine-standard and make note of steps 1 and 3 under the deploy section, which set the APP_STORAGE
path to /tmp so that it will be writable.
这篇关于流或文件"/app/storage/logs/laravel.log"位于无法打开:无法打开流:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!