F
Filament14mo ago
MiR

Apperance changed in production environment

I have deploy mi filament app in railway, and all works fine. But when render page, some style is different that local environment. Background form fields are white color and his text is white too. In dashboard doesn't show title app, and the side menu are out of square with main content. I am using default theme, and try with ligth and darkmode. Can you help me to found problem and solve it??
No description
No description
19 Replies
awcodes
awcodes14mo ago
Try ‘php artisan filament:upgrade’ on your server.
MiR
MiROP14mo ago
Already upgrade filament, but not solve the problem
DrByte
DrByte14mo ago
Perhaps your browser has cached older versions of the files? Perhaps your server is doing some asset caching, and not serving the updated assets? Use browser dev tools to inspect the actual css/js files that it is receiving from the server, and compare those with what "should" be served. Then sort out the problems after that.
MiR
MiROP14mo ago
Cache dont seems to be the problem. Try it with other browser and devuces with same result local instance render ok and production instance is not ok. I create a new project to deoloy other instance (in Railway) but a have same result
awcodes
awcodes14mo ago
Are you using a custom theme by chance?
DrByte
DrByte14mo ago
Is the browser reporting any Network errors when loading any CSS files? Is there a version number appended to the URL for loading the css files? What is it? and does that match your Filament version? And, again, is the CSS that the browser is receiving actually matching the expected CSS that you pushed to the production server? If what your browser is receiving doesn't match what you pushed to the server, then the server is serving something cached/stale. But if all the css files received by the browser are the same as what you pushed to production, then the problem is elsewhere ... probably in files that got missed in the deployment.
Bellegend
Bellegend14mo ago
Try npm run build
MiR
MiROP14mo ago
Hi, there arent errors loading CSS yes, has version appended to URL i check version appended in local and production, and is not the same local version is 3.0.45.0
root
root14mo ago
Hi, railway person here - are you using the default PHP builder?
MiR
MiROP14mo ago
and production version is 3.0.79.0 sorry, i dont understand your question
root
root14mo ago
Are you using a Dockerfile/have you changed your build or deploy settings at all?
MiR
MiROP14mo ago
i deploy production in railway connecting with github project with the same code and config (except bd credentianls) that local this is my nix command : NIXPACKS_BUILD_CMD=npm run build && php artisan optimize:clear && php artisan cache:clear && php artisan config:clear && php artisan config:cache && php artisan filament:upgrade
root
root14mo ago
Try removing the build command - the PHP provider has a lot of carefully-balanced stuff that's easily broken by custom configs
LeandroFerreira
LeandroFerreira14mo ago
could you try?
//AppServiceProvider.php
public function boot()
{
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
}
//AppServiceProvider.php
public function boot()
{
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
}
app/Http/Middleware/TrustProxies.php protected $proxies = '*';
MiR
MiROP14mo ago
i have force https and ll proxies already, because without this in production dont work fine tring to redeploy without build, same result. logs to deploy: [Region: us-west1] ============== Using Nixpacks ============== context: 3e75f31e1a070abf0acc2f4b96df744e ╔══════════════════════════════ Nixpacks v1.17.0 ══════════════════════════════╗ ║ setup │ (php81.withExtensions (pe: pe.enabled ++ [])), perl, nginx, ║ ║ │ libmysqlclient, php81Packages.composer, nodejs_18, npm-9_x ║ ║──────────────────────────────────────────────────────────────────────────────║ ║ install │ mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx ║ ║ │ composer install --ignore-platform-reqs ║ ║ │ npm i ║ ║──────────────────────────────────────────────────────────────────────────────║ ║ build │ php artisan optimize:clear && php artisan cache:clear && php ║ ║ │ artisan config:clear && php artisan config:cache && php artisan ║ ║ │ filament:upgrade && php artisan --version ║ ║──────────────────────────────────────────────────────────────────────────────║ ║ start │ perl /assets/prestart.pl /assets/nginx.template.conf ║ ║ │ /nginx.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c ║ ║ │ /nginx.conf)
LeandroFerreira
LeandroFerreira14mo ago
Hum, I don't know try to add in your .env ASSET_URL=https://yoururl
MiR
MiROP14mo ago
Asset url is setted with https, because dont load css with http
root
root14mo ago
Could you join the Railway discord and make a help thread there? (and ping me (@aleks) in - you can send a screenshot of this message if someone says "rule #5") https://discord.gg/railway At this point I'm pretty sure this is a Railway issue
MiR
MiROP14mo ago
Done! Thanks @root
Want results from more Discord servers?
Add your server