changelog.com
changelog.com copied to clipboard
Docker: Get file watching/live reload working for dev
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.
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+.
@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.
Pretty sure that we could solve this too part of https://github.com/thechangelog/changelog.com/issues/324#issuecomment-1224976158.