Comments (10)
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.
Hi, Ajain. I'm unable to reproduce this issue. Are you running the latest version of Docker for Mac?
from relay-starter-kit.
Hi. Seems to work for me. Not having issues with Live Reload on MacOSx.
from relay-starter-kit.
@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.
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.
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.
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.
@ajainvivek it should work without setting usePolling: true
. Can you check docker --version
?
from relay-starter-kit.
Sorry for the late response the docker version .. I was running was Docker version 1.12.2, build bb80604
from relay-starter-kit.
@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)
- Adding controller/service layer for business logic HOT 3
- MongoDB instead of PostgreSQL HOT 1
- Where is the Passport.js implementation? HOT 1
- Dependabot can't resolve your JavaScript dependency files
- File Upload HOT 3
- Dependabot can't resolve your JavaScript dependency files
- Dependabot can't resolve your JavaScript dependency files
- big int HOT 1
- SyntaxError: Unexpected token = HOT 2
- Missing quotation marks in setup.js HOT 2
- Feature Request: "New Feature Walkthrough"
- Add the flexibility of multiple roles HOT 1
- Bug with emails that have "." in them breaks username requirements
- README.md out of date - no "setup" script HOT 3
- Nightly build fails
- Account settings page does not update
- docker image for the repo HOT 1
- error while run yarn setup HOT 1
- Readme.md has not been updated. HOT 1
- app-deploy.js file does not exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relay-starter-kit.