I have the same issue
Mar 18, 2024
3
Level 1
Filament, Laravel Forge and Octane not automatically loading assets
Hi, I have a Filament backend, deployed to a server using Laravel Forge with Octane.
When Forge deploys the backend, the styles are completely off. I noticed that my public/build/assets/theme-xxxx.css file is incomplete.
If I run npm run build manually on the server, and reload Octane, things go back to normal, but this is was the Forge script does already
Here is what my Forge deploy script looks like:
cd /home/forge/mysite.com
git pull origin $FORGE_SITE_BRANCH
$FORGE_COMPOSER install --no-dev --no-interaction --prefer-dist --optimize-autoloader
if [ -f artisan ]; then
$FORGE_PHP artisan migrate --force
$FORGE_PHP artisan app:update
npm ci
npm run build
fi
$FORGE_PHP artisan horizon:terminate
$FORGE_PHP artisan octane:reload
Any clues what's happening?
Edit: I noticed that when the build script runs on Forge the output theme files is 15kb smaller than when I run it manually on the server
Please or to participate in this conversation.