klakegg/docker-hugo

Server does not watch for changes

LCluber opened this issue · 2 comments

Hello,
I'm trying to use this docker image for Hugo website development.
Everything is fine in the server mode except nothing happens when I change a file. The server is not actually watching for changes.

docker-compose file :

version: "3.8"
services:
  hugo:
    image: klakegg/hugo:0.101.0-alpine
    volumes:
      - ".:/src"
    ports:
      - "1313:1313"
    command: server

I also tried command: "serve -D".

I tried to change a file in the content folder both in my repo and directly into the container CLI. Volume is well defined as any change on one side is reflected on the other side. But nothing happens in the container logs. The server does not rebuild.

Container logs :

Start building sites … 
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66 linux/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio

2022-07-25T10:26:27.037249668Z |   
-------------------+------
  Pages            |  21  
  Paginator pages  |   0  
  Non-page files   |   0  
  Static files     | 131  
  Processed images |   0  
  Aliases          |   1  
  Sitemaps         |   1  
  Cleaned          |   0  

Built in 2999 ms
Watching for changes in /src/{archetypes,content,data,static,themes}
Watching for config changes in /src/config.toml
Environment: "DEV"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/<website-name>/ (bind address 0.0.0.0)
Press Ctrl+C to stop

Tested on Windows 10 enterprise and Docker v20.10.17

Is this duplicate of #61?

Hello, thanks for your quick answer.
it is indeed the same issue.
Solutions stated in it did not work for me.

I tried with "--watch", "--liveReloadPort", "--disableFastRender", "-D", "-F" in a bunch of different combinations.
Result is still the same : no reload on file change.

Note that I do not have the issue on osx.

I will keep following the topic in issue #61 and close this one.