R
Railway3y ago
Issam

Can't setup a Laravel app with Nixpacks

I have a Laravel app that works well when using Heroku buildpacks. When I build Nixpacks and launch the site, I get this error: The /app/bootstrap/cache directory must be present and writable. I tried changing the Build Command to this npm run prod && php artisan cache:clear && composer dump-autoload && chmod -R 777 storage/ (which I found on Stack Overflow), when launching the site, I get this error instead: copy(/app/app/Console/Commands/ChartMakeCommand.php): Failed to open stream: Permission denied Any idea on how to solve this?
4 Replies
JustJake
JustJake3y ago
Sounds like you need to chmod your file
Issam
IssamOP3y ago
the chmod-ing needs to happen on Railway, how would this work?
JustJake
JustJake3y ago
It does not Chmod it then commit the file Or you could also run that chmod -r 777 on app/app/Console Though, wouldn’t recommend 777 for security reasons Might end up serving files you don’t want to serve
Issam
IssamOP3y ago
I'm on Windows so I used icacls instead, thing is, changing the permissions appears to alter nothing about the files, so they can't be added into a commit Also worth noting that none of this occurs when using Heroku Buildpacks.
Want results from more Discord servers?
Add your server