[GH-ISSUE #1225] Hot reload not working in Docker dev setup on Windows (WSL2) #3759

Closed
opened 2026-04-20 07:50:42 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Pallavikumarimdb on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1225

Description

When running the project on Windows, file changes in the local filesystem are not being detected properly, which causes issues with hot reload or other file-watching mechanisms.

Development Guide Says:
Image

Environment

  • Host OS: Windows 10
  • WSL2/Docker Backend: Docker Desktop using WSL2
  • App running via docker-compose

Cause

The problem is with WSL2 or native file system watchers inside Docker containers on Windows hosts.

📝 Suggested Fix

Update the project's docker-compose.yml template or provide guidance in the Development Guide for Windows users to add the following environment variables:

- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true

It might slightly increase CPU usage, but for development only (not production), that’s fine.

Originally created by @Pallavikumarimdb on GitHub (Aug 6, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/1225 ### Description When running the project on **Windows**, file changes in the local filesystem are not being detected properly, which causes issues with hot reload or other file-watching mechanisms. Development Guide Says: <img width="972" height="417" alt="Image" src="https://github.com/user-attachments/assets/3c72e759-baa0-47b8-9960-a6977361726b" /> ### Environment - **Host OS**: Windows 10 - **WSL2/Docker Backend**: Docker Desktop using WSL2 - App running via `docker-compose` ### Cause The problem is with WSL2 or native file system watchers inside Docker containers on Windows hosts. ### 📝 Suggested Fix Update the project's `docker-compose.yml` template or provide guidance in the Development Guide for Windows users to add the following environment variables: ```yaml - WATCHPACK_POLLING=true - CHOKIDAR_USEPOLLING=true ``` It might slightly increase CPU usage, but for development only (not production), that’s fine.
Author
Owner

@Pallavikumarimdb commented on GitHub (Aug 6, 2025):

@oschwartz10612 , Would you prefer updating the docker-compose.yml or should we instead document this in the Development Guide as a note for Windows users?
Happy to raise a PR based on your suggestion!

<!-- gh-comment-id:3160249464 --> @Pallavikumarimdb commented on GitHub (Aug 6, 2025): @oschwartz10612 , Would you prefer updating the docker-compose.yml or should we instead document this in the Development Guide as a note for Windows users? Happy to raise a PR based on your suggestion!
Author
Owner

@marcschaeferger commented on GitHub (Aug 7, 2025):

@Pallavikumarimdb if all the files are located directly within the Docker WSL instance (prefered) (or another WSL instance), hot reload should work as expected. This issue typically arises due to the performance and compatibility limitations of file syncing between the Windows host and WSL2/Docker containers.

To streamline development, you can use Visual Studio Code (VSCode) to connect directly to a WSL instance. Either the "Remote - WSL" extension for VSCode or the "Remote - SSH" extension.

<!-- gh-comment-id:3166155520 --> @marcschaeferger commented on GitHub (Aug 7, 2025): @Pallavikumarimdb if all the files are located directly within the Docker WSL instance (prefered) (or another WSL instance), hot reload should work as expected. This issue typically arises due to the performance and compatibility limitations of file syncing between the Windows host and WSL2/Docker containers. To streamline development, you can use Visual Studio Code (VSCode) to connect directly to a WSL instance. Either the "Remote - WSL" extension for VSCode or the "Remote - SSH" extension.
Author
Owner

@Pallavikumarimdb commented on GitHub (Aug 8, 2025):

@marcschaeferger , thanks for the helpful insight! That makes sense — storing project files directly within the WSL2 instance and using VS Code's "Remote - WSL" extension would indeed avoid the need for polling.

It might be helpful to include both setup options (polling-based workaround and the recommended WSL setup) in the Development Guide for Windows users as a reference.

<!-- gh-comment-id:3166889613 --> @Pallavikumarimdb commented on GitHub (Aug 8, 2025): @marcschaeferger , thanks for the helpful insight! That makes sense — storing project files directly within the WSL2 instance and using VS Code's "Remote - WSL" extension would indeed avoid the need for polling. It might be helpful to include both setup options (polling-based workaround and the recommended WSL setup) in the Development Guide for Windows users as a reference.
Author
Owner

@marcschaeferger commented on GitHub (Aug 8, 2025):

@Pallavikumarimdb I'll update the documentation later today to include both setup options for Windows users. In the meantime, here (https://docs.docker.com/desktop/features/wsl/best-practices/) the official Docker recommendation regarding Windows and Docker hot reload/file change notification:

<!-- gh-comment-id:3167767601 --> @marcschaeferger commented on GitHub (Aug 8, 2025): @Pallavikumarimdb I'll update the documentation later today to include both setup options for Windows users. In the meantime, here (https://docs.docker.com/desktop/features/wsl/best-practices/) the official Docker recommendation regarding Windows and Docker hot reload/file change notification:
Author
Owner

@oschwartz10612 commented on GitHub (Aug 16, 2025):

Closed by https://github.com/fosrl/docs-v2/pull/2 I think?

<!-- gh-comment-id:3193380086 --> @oschwartz10612 commented on GitHub (Aug 16, 2025): Closed by https://github.com/fosrl/docs-v2/pull/2 I think?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#3759