Unverified Commit 21d2f73b authored by Colby Gutierrez-Kraybill's avatar Colby Gutierrez-Kraybill Committed by GitHub

Merge pull request #1975 from colbygk/docker_ergonomics

watchOptions required for use in docker environment
parents 1d282a48 5bf674a4
......@@ -5,3 +5,4 @@ intl/*
locales/*
**/*.min.js
**/node_modules/*
scratch-gui/*
......@@ -21,7 +21,18 @@ routes.forEach(route => {
app.get(route.pattern, handler(route));
});
app.use(webpackDevMiddleware(compiler));
var middlewareOptions = {};
if (process.env.USE_DOCKER_WATCHOPTIONS) {
middlewareOptions = {
watchOptions: {
aggregateTimeout: 500,
poll: 2500,
ignored: ['node_modules', 'build']
}
};
}
app.use(webpackDevMiddleware(compiler, middlewareOptions));
var proxyHost = process.env.FALLBACK || '';
if (proxyHost !== '') {
......
......@@ -15,6 +15,7 @@ services:
environment:
- API_HOST=http://localhost:8491
- FALLBACK=http://localhost:8080
- USE_DOCKER_WATCHOPTIONS=true
build:
context: ./
dockerfile: Dockerfile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment