GithubHelp home page GithubHelp logo

Comments (10)

koistya avatar koistya commented on April 30, 2024 3

In order to make the file watcher use "polling", create docker-compose.override.yml file in the root directory of your project with the following content:

version: '3'
services:
  api:
    environment:
      - CHOKIDAR_USEPOLLING=true

from relay-starter-kit.

koistya avatar koistya commented on April 30, 2024

Hi, Ajain. I'm unable to reproduce this issue. Are you running the latest version of Docker for Mac?

from relay-starter-kit.

bwoodlt avatar bwoodlt commented on April 30, 2024

Hi. Seems to work for me. Not having issues with Live Reload on MacOSx.

from relay-starter-kit.

koistya avatar koistya commented on April 30, 2024

@ajainvivek ah, maybe you expecting it to reload the browser? But this project doesn't have any front-end code, nothing to reload in a browser, it just restarts Node.js app server once code changes are detected. The "Welcome, Guest! Login" message on the homepage is just a testing page, for demonstration purposes. This project exposes only two endpoints - /graphql and /login/* which can be added to a front-end app via a reverse proxy (Nginx, IIS etc.).

from relay-starter-kit.

ajainvivek avatar ajainvivek commented on April 30, 2024

I am running Docker version 1.12.2, build bb80604 I can see the files getting changed over the docker container but the node server doesn't restart. I have made changes to users.js.

watch mode is also set to true.

watcher.on('all', (event, src) => {
    console.log('file changed......');
    // Reload the app if .env or package.json file has changed (in watch mode)
    if (src === '.env' || src === 'package.json' || src === 'yarn.lock') {
      if (ready && onComplete) onComplete();
      return;
    }

chokidar doesn't capture file changes event after build. the log doesn't print after build

I am testing the changes on GraphiQL

from relay-starter-kit.

koistya avatar koistya commented on April 30, 2024

Ajain, I'm not sure what causes this issue yet, but would you consider upgrading Docker for Mac to 1.12.5? Maybe this will fix the issue. At least this is the simplest thing to try first.

from relay-starter-kit.

ajainvivek avatar ajainvivek commented on April 30, 2024

I have also upgraded docker on the docker-machine instance but the file changes where never triggered.

After enabling polling. It works.

usePolling: true

I have other projects which uses nodemon which requires legacyWatch enabled to make it work on docker.

I am curious to know. How to make it work?

from relay-starter-kit.

koistya avatar koistya commented on April 30, 2024

@ajainvivek it should work without setting usePolling: true. Can you check docker --version?

from relay-starter-kit.

ajainvivek avatar ajainvivek commented on April 30, 2024

Sorry for the late response the docker version .. I was running was Docker version 1.12.2, build bb80604

from relay-starter-kit.

koistya avatar koistya commented on April 30, 2024

@ajainvivek I'm still unable to reproduce the issue. Maybe you can try the latest Docker version - v17.03.0 Community Edition. Closing for now, feel free to re-open if this issue still exists.

from relay-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.