storage:link not working properly while deploying laravel application to elastic beanstalk via codecommit

I am using Elastic Beanstalk environment to host my Laravel application.

And I’m using CodeCommit as codesource when I’m deploying.

Lastly, I’m using an init.config file inside .ebextensions folder to automatically run some commands for my EC2 instances.

//init.config inside .ebextensions
container_commands:
    01storagelink:
        command: "php artisan storage:link"

This command is working when I make deployment BUT it is linking the public/storage to an unexpected path (for me) as shown in the picture:

enter image description here

How can I resolve the issue? (I’m going to keep the research in the meantime)

Answer

Attribution
Source : Link , Question Author : Adem Tepe , Answer Author : Community

Leave a Comment