Search code examples
laraveldockerstorage

laravel-8 storage accessing using docker


can't access images inside /public/storage
i have done php artisan storage:link

the files are visible when using my local environment but when switching to Docker environment with the same code, i can't access them (not found)
my files owner is the same as in my docker config
i test it by visiting http://127.0.0.1:8000/storage/test.png
where test.png is inside public/storage
I have 3 services inside my docker-compose file

  1. Nginx
  2. PHP
  3. MYSQL


I think the problem from permissions but i can't figure out the solution


Solution

  • if anyone faced the same issue.
    i managed to solve this by removing the symlink created by laravel and make my own one from my nginx container based on the real path inside my container