modd
modd copied to clipboard
Daemons do not restart when running modd in a Docker container.
I am using modd
to rebuild and run a binary when .go
files have changed. All works well when I run modd
on my host OS, but when I run modd
in a Docker container, the daemon as defined in my modd.conf
does not restart. It hangs on >> sending signal hangup
. Changing the signal to sigterm
or sigquit
, etc. does not work.
My modd.conf
looks like this:
**/*.go {
prep: make install
daemon: web-service
}
Do you have any idea what is going on here?
I'd need information to be sure what's going on here. I did, however, just revamp process management and signalling in a way that closes some corner cases. Could you please install the repo master and confirm that you are still seeing issues?
I think this is related to docker itself, see https://forums.docker.com/t/file-system-watch-does-not-work-with-mounted-volumes/12038/13
I'm experiencing the same thing on macos. Is there a good workaround?
Mounting a single file (like main.go) prevent watcher from working. You need to mount the whole dir, don't know if related to docker or modd itself.
volumes:
# - ./services/golang/main.go:/srv/main.go:ro # prevent watcher from working
- ./services/golang:/srv:ro # works as expected
Do YOU need to set permissions?