Laravel Storage Volume

How can I configure volume mount path for laravel to not delete everything in storage folder on every deployment?
Solution:
Sorry my fault. I changed mount path to /app/storage/app and it works fine. πŸ™
Jump to solution
12 Replies
Percy
Percyβ€’5mo ago
Project ID: 8b792e10-2ce8-4e92-b48d-c9d92c890b40
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
8b792e10-2ce8-4e92-b48d-c9d92c890b40
Brody
Brodyβ€’5mo ago
what storage path is in use in your deployment?
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
/storage/media/* but in volume I am using /storage I also tried /public/storage
Brody
Brodyβ€’5mo ago
but what is the actual path in the container files are stored?
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
/storage/public but than its linked to /public/storage public files are uploaded in /storage/public its linked to /public/storage and can access with domain.com/storage
Brody
Brodyβ€’5mo ago
mount a volume to /app/storage/public
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
I did know this image path works https://boleta-do-laravel-main-production-20e7.up.railway.app/storage/images/event/01J369F9QAX6ZXZQ1D4DGKNEJ6.jpg I am deploying now new updates now its not working its deleted
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
No description
No description
Brody
Brodyβ€’5mo ago
that's a URL what is the path your code saves files to
saakashvili(nefe)
saakashvili(nefe)OPβ€’5mo ago
/storage/public
Solution
saakashvili(nefe)
saakashvili(nefe)β€’5mo ago
Sorry my fault. I changed mount path to /app/storage/app and it works fine. πŸ™
Want results from more Discord servers?
Add your server