Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload not working on the latest version in docker container #132

Open
icaroNZ opened this issue Jun 8, 2021 · 3 comments
Open

Hot reload not working on the latest version in docker container #132

icaroNZ opened this issue Jun 8, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@icaroNZ
Copy link

icaroNZ commented Jun 8, 2021

Describe the bug
The hot reload is not working on Docker using the image denoland/deno:1.10.3

To Reproduce Steps to reproduce the behavior:
1 - Download a simple project here: https://github.com/icaroNZ/denon-reload-problem
2 - run docker-compose up
3 - modify the main.ts file

Expected behavior
Expected that the application will reload once the main.ts file is changed

Configuration or Project
The project was suppose to use a denon.json file for configuration:

{
  "scripts": {
    "start": {
      "cmd": "deno run --allow-net --allow-env src/main.ts"
    }
  },
  "watcher": {
    "exts": ["js", "jsx", "ts", "tsx", "json"],
    "match": ["**/*.*"],
    "skip": ["Dockerfile"]
  },
  "logger": {
    "fullscreen": false,
    "quiet": false,
    "debug": true
  }
}

For simplicity the docker compose file just run denon run --allow-env --allow-net src/main.ts instead

Is expected both solutions to work.

Setup

  • OS: macOS/windows
  • Deno version: 1.10.3
  • Denon version: 2.4.7
@icaroNZ icaroNZ added the bug Something isn't working label Jun 8, 2021
@algoflows
Copy link

I have exactly the same issue, tried so many different settings and nothing seems to work it has to be an issue with denon restarts on file changes working correctly within the container.

@algoflows
Copy link

Denon still actively maintained?

@fractalf
Copy link

fractalf commented Mar 15, 2022

I found out why this is an issue. It appears like events are not triggered when files change in a mounted volume in a docker container. This seems to be a problem also for nodemon.

Refs:

So the fix/workaround here is to enable polling by setting "legacy": true in the config file under the property "watcher". After I did this it now "hot reloads".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants