Written by

Sr. Software Engineer at HST Pathways
Question Michael Davidovich · May 13, 2022

Web Application Updates on Docker

We are experience this with our own web app and even the demo/template here: intersystems-community/iris-fullstack-template: This template shows you how to build, test and deploy a simple full-stack application using InterSystems IRIS REST API (github.com)

When changes are made to CSS or HTML files, we can see the changes are saved to file in the Docker container by visiting the command line.  However, after refreshing, clearing cache, etc. the changes don't appear on the web application in the browser.  Viewing the source css in the browser, we see it's the old file.  

Had a minor success where I updated the css and html and upon changing browsers, the css was now updated but the html was the old version.  

Is this a browser issues?  Docker issue? IRIS issue? 

Has anyone experienced this challenge?

$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.2 (Build 649U) Thu Jan 20 2022 08:53:15 EST

Comments

Michael Davidovich · May 13, 2022

A update already: it seems the CSS has now updated on both browsers, but the HTML is still not updated.  This lag seems quite off.  When I update CSS locally (not Docker) it changes on refresh.  

0
Michael Davidovich  May 13, 2022 to Michael Davidovich

After 30 mins or so both the CSS change (changed from Ariel to Times) and the HTML (added "TESTING!!!" in the heading) ended up refreshing.

Why is there this lag?  Must be the browser?

0
Dmitry Maslennikov · May 13, 2022

Is it for production use or for development? In production, you should separate the web in a separate container with own web server and cache settings.

If it's in development, and your web folder is mounted outside of the container, it looks like just a caching on WebGateway. Change Serve Files to just Always, instead of default Always and Cached

0
Michael Davidovich  May 13, 2022 to Dmitry Maslennikov

Using the demo, the web folders are in the container.  I will try this though and see if it changes things.

0
Michael Davidovich  May 13, 2022 to Dmitry Maslennikov

@Dmitry Maslennikov This seemed to help as the changes to the HTML are instant with the changed setting, however the CSS didn't change.  After clearing the browser cache then I saw the changes.  Assuming there must be a browser setting that hold on to the CSS.  I'm not sure.  

We haven't quite solved this for our own app.  All the progress thusfar has been in the demo app from GitHub (the coffee shop).

0
Dmitry Maslennikov  May 13, 2022 to Michael Davidovich

In case if I change anything in files, I usually update the page in a browser by ignoring cache. In Chrome on macOS it's with hotkey Cmd+Shift+R. 

0
Taylor Carroll  May 13, 2022 to Dmitry Maslennikov

I have these settings set already, and the timeout set to 1. The CSS files is updating for me in the container but the browser doesn't update. I've tried multiple browsers and cleared cache.

0