changelog.com icon indicating copy to clipboard operation
changelog.com copied to clipboard

Docker: Get file watching/live reload working for dev

Open lawik opened this issue 4 years ago • 3 comments

Not sure about the exact reason, but with the standard docker compose I'm not getting live reloads. Might be a missing inotify-tools or something. Should take a look.

lawik avatar Jul 25 '20 08:07 lawik

I believe you're right. I have the inotify-tools apt package in my Dockerfile and live reload works in a different Phoenix app.

inotify events should work with Docker Desktop on both Windows and MacOS. Although this wasn't the case on Windows for older versions of Docker Desktop. You need the version where they moved over to the new volume mount strategy. I think that's version 2.2+.

nickjj avatar Jul 25 '20 09:07 nickjj

@gerhard I think this is probably the reason I need to run mix phx.digest manually to get JS/CSS updated as well. But I'll just mentioned that here so you know that might be good to check when you are working on the fix.

So the things that should probably work is that the current view should refresh in the browser when a file is changed that affects it. Both for Elixir and JS, if I'm not mistaken.

lawik avatar Jul 30 '20 12:07 lawik

Pretty sure that we could solve this too part of https://github.com/thechangelog/changelog.com/issues/324#issuecomment-1224976158.

gerhard avatar Aug 23 '22 23:08 gerhard