From 6e7b83b82fc9dcb5ef68201b341b0ca5e21b025c Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Fri, 6 Jan 2017 16:24:37 +0000 Subject: [PATCH] Fixing docker deployment --- frontend/Makefile | 2 +- frontend/package.json | 2 +- frontend/webpack/paths.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/Makefile b/frontend/Makefile index f7f2cfda..561cc1cc 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -11,7 +11,7 @@ install-production: compile .PHONY: install install: - yarn install --prefer-offline + NODE_ENV=development yarn install --prefer-offline .PHONY: clean clean: diff --git a/frontend/package.json b/frontend/package.json index 7df85961..9c0d54eb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,7 +15,7 @@ "test": "make test", "open": "nyc report --reporter=html & open coverage/index.html", "coverage": "nyc check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "build-locales": " CONFIG=$(pwd)/webpack/index.js NODE_ENV=test babel-node scripts/build-locales", + "build-locales": " CONFIG=$(pwd)/webpack/index.js babel-node scripts/build-locales", "clean-static": "git check-ignore static/** | xargs rm" }, "dependencies": { diff --git a/frontend/webpack/paths.js b/frontend/webpack/paths.js index 1d154de0..4a173968 100644 --- a/frontend/webpack/paths.js +++ b/frontend/webpack/paths.js @@ -2,7 +2,9 @@ const path = require('path'); const ROOT = path.join(__dirname, '../..'); const UI = path.join(ROOT, 'ui'); -const FRONTEND = path.join(ROOT, 'frontend'); +const FRONTEND = process.env.NODE_ENV === 'production' + ? path.join(__dirname, '../') + : path.join(ROOT, 'frontend'); module.exports = { ROOT,