Deploying production assets
I set some files and settings in the /auth/setup screen, including a background image and favicons. When deploying to the server, this is ignored and there are broken images and assets. What is the correct way to do this? I tried removing the /public/storage line from the .gitignore file but it still doesn't work and I feel that I might have made a mess.
Do you not commit your static assets to the repository and just upload them manually?
Hey!
This usually happens because the files you upload via /auth/setup are stored in storage/app/public and accessed through a symlink at public/storage.
On your production server, make sure to run:
php artisan storage:link
Also, make sure the uploaded files actually exist on the server. If you didn’t copy over the storage/app/public folder, the images will be missing. These files aren’t typically committed to Git—you’d usually upload them manually or sync them during deployment.
No need to remove public/storage from .gitignore. Just ensure the symlink exists and the files are in place. Let me know if you want help automating that part!
