dimanche 4 octobre 2020

Permission Issue on GCP with Laravel Storage Folder

Laravel when upload on Google Cloud Platform standard app engine environment. It always gives permission issues on deployment. Some time it tries to access cache from the path which shows route of my local directory. I have added this code in my composer script, tried deleting my composer.lock file and reuploaded and then tested as well.

  "post-install-cmd": [
      "Illuminate\\Foundation\\ComposerScripts::postInstall",
      "@php artisan optimize",
      "chmod -R 755 storage bootstrap\/cache" 
  ] 

Even error shows my local directory path!!!!!!!! I have already added environment variables on yaml as well.

  APP_STORAGE: /tmp
  VIEW_COMPILED_PATH: /tmp
ErrorException: file_put_contents(/media/riyo/64984189-3b2b-43bd-827f-3febb9e673a4/Havn/microservices/orders-microservice/storage/framework/cache/data/5f/79/5f79ca28c5f23bb2bdee5c894f207355b5536cf9): failed to open stream: No such file or directory

Nothing seems to work i have switched to flex environment and tried as well! Anyone has solution for this issue?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire