How can I do php artisan storage:link in my laravel project?

thomaslegal10PRO

a year ago

I have a laravel project, I'm trying to upload it. I want to place a volume and run storage:link. How can I do it?

1 Replies

thomaslegal10PRO

a year ago

N/A


thomaslegal10PRO

a year ago

I put it in the start command, but it didn't work


thomaslegal10PRO

a year ago

runs the command correctly, but the folders it picks up seem to be wrong


thomaslegal10PRO

a year ago

my local is this

1242801905680515000


thomaslegal10PRO

a year ago

this in Railway

1242802007375483000


thomaslegal10PRO

a year ago

this storagepublic is weird


a year ago

What’s your start command?


thomaslegal10PRO

a year ago

1242803258062540800



thomaslegal10PRO

a year ago

I tried, but permission was denied


thomaslegal10PRO

a year ago

1242806563971010600


a year ago

What’s your /config/filesystems.php look like?


thomaslegal10PRO

a year ago


a year ago

Looks like maybe the link could’ve been successful, odd that the path would appear like that though. Wanna try it to see if the files persist?


a year ago

I tried a Laravel deployment and got the same path but it said the link already existed when I tried another deploy.


thomaslegal10PRO

a year ago

Always appears as being created again


thomaslegal10PRO

a year ago

And I don't know the link to access the storage


thomaslegal10PRO

a year ago

The application crashes when I run this command


thomaslegal10PRO

a year ago

It doesn't work, when I try to access the home page, it doesn't access


thomaslegal10PRO

a year ago

And I would like to persist the storage data, on a volume or something like that


thomaslegal10PRO

a year ago

someone?


a year ago

Sorry, I don’t really know. I could look more into it when I get time if you want.


alexhiriavenkoTRIAL

5 months ago

create "build-app.sh" file. with "php artisan storage:link" code. Write comand "chmod +x ./build-app.sh && sh ./build-app.sh" in Settings->Build. Then redeploy.


fcaceres98PRO

3 months ago

In your API variables add this NIXPACKSBUILDCMD="composer install && npm install --production && php artisan optimize && php artisan config:clear && php artisan config:cache && php artisan route:clear && php artisan route:cache && php artisan view:cache && php artisan storage:link"


fcaceres98PRO

3 months ago

When you attache the volume set the path to /app/storage


fcaceres98PRO

3 months ago

This worked for me