F
Filamentβ€’12mo ago
ПIᄃK

Admin panel isn't loading correctly

Hello, rn Im deploying my website in production and I have a problem that sometimes the backend isnt loading correctly. Im deploying it with ploi and im using this deployment script:
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
npm ci
npm run build
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

php artisan migrate --force
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "πŸš€ Application deployed!"
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
npm ci
npm run build
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

php artisan migrate --force
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "πŸš€ Application deployed!"
Its maybe 50/50 if everything works fine. If not it looks like this: (the red rectangle is just to hide the name) Is something wrong with my deployment script? There are no errors on the web console and when im running npm run build after the deployment it normally works as usual. thanks in advance πŸ™‚
No description
No description
3 Replies
Helge Sverre
Helge Sverreβ€’12mo ago
try running it again but change :cache to :clear on all the commands also, composer install before you npm build, as it might be missing some vendor scripts stuff
ПIᄃK
ПIᄃKOPβ€’12mo ago
unfortunately its still not working (same problem). My deployment script looks like this rn:
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

npm ci
npm run build

php artisan migrate --force
php artisan config:clear
php artisan event:clear
php artisan route:clear
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "πŸš€ Application deployed!"
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

npm ci
npm run build

php artisan migrate --force
php artisan config:clear
php artisan event:clear
php artisan route:clear
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "πŸš€ Application deployed!"
DrByte
DrByteβ€’11mo ago
It seems like the Filament assets haven't been published/copied to your public directory. Are those committed to the public dir in git before you deploy?
Want results from more Discord servers?
Add your server