JavaScript Assets Not Loading After bench build or Update in Dockerized Fullstack Frappe Project

Hi everyone,

I’m building a fullstack application using Frappe, HTMX, and Jinja. All of my static assets (JavaScript, CSS, and images) are stored inside the public directory of my custom app.

However, after running any of the following commands:

  • bench build
  • bench update --build
  • bench migrate
  • bench clear-cache
  • bench clear-website-cache

…the updated JavaScript files don’t seem to be loaded or reflected in the browser. Even after a hard refresh or clearing the browser cache, the old version of the JS file is still used (or sometimes not loaded at all).

I’m deploying this setup using Docker, and this problem persists even after restarting the container.

Things I’ve checked:

  • The files are updated correctly in the public folder.
  • The browser still serves an outdated or cached version.
  • The static URL paths look correct but don’t reflect the latest changes.

Is there something specific I need to do to properly bust the cache or ensure the latest assets are served in a Dockerized Frappe setup?

Any guidance or best practices would be appreciated!

Thanks in advance!

Thanks a lot for the suggestion!
I’ll give it a try and see if it solves the issue. Really appreciate you taking the time to help out :raised_hands: