Changes by IDE in mounted directory not being watched?
saitho opened this issue · 2 comments
Hi,
I'm currently using this docker-compose file to spin up my local development environment:
version: '2'
services:
hugo_dev:
image: jojomi/hugo:latest
ports:
- "1313:1313"
environment:
- HUGO_WATCH=1
volumes:
- ./src/:/src
When I edit a file in my IDE (IntelliJ) the file on the Docker container is updated, but Hugo does not recompile... When I log onto the container, open the file with vi
and just write it again without making any changes Hugo recompiles and refreshes the site.
Any ideas how to fix that? :(
I found out that this is a technical problem on Windows. You need an additional tool to watch the files on the Windows system and tell the Docker container that it has changed. I used: https://www.npmjs.com/package/docker-windows-notifier
This tool only updates CHMOD which Hugo ignores atm. However there are discussions on the Hugo project: gohugoio/hugo#4054
That being said I'm closing this issue. ;)
Thank you for providing feedback for others with similar problems!