diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..74b7ed51529 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:8-jessie + +WORKDIR /usr/src + +# Install dependencies +COPY package.json yarn.lock ./ +RUN yarn + +# Copy the relevant files to the working directory +COPY . . + +# Build and export the app +RUN yarn build +RUN cp -R dist /public diff --git a/now.json b/now.json index 94058e0e4ee..08b930171cf 100644 --- a/now.json +++ b/now.json @@ -1,21 +1,4 @@ { "name": "neo4j-browser", - "engines": { - "node": "^8.11.2" - }, - "public": true, - "files": [ - "scripts/", - "src/", - ".babelrc", - ".eslintignore", - ".eslintrc.json", - ".yarnrc", - "cypress.json", - "jsconfig.json", - "postcss.config.js", - "webpack.config.js", - "yarn.lock", - "README.md" - ] + "type": "static" } diff --git a/src/shared/modules/commands/helpers/play.js b/src/shared/modules/commands/helpers/play.js index 70fa2a83084..423c7805296 100644 --- a/src/shared/modules/commands/helpers/play.js +++ b/src/shared/modules/commands/helpers/play.js @@ -31,8 +31,10 @@ export const fetchRemoteGuide = (url, whitelist = null) => { } resolve() }).then(() => { - return remote.get(url).then(r => { - return cleanHtml(r) - }) + return remote + .get(url, { pragma: 'no-cache', 'cache-control': 'no-cache' }) + .then(r => { + return cleanHtml(r) + }) }) } diff --git a/src/shared/services/remote.js b/src/shared/services/remote.js index 1f615074abc..07408840df1 100644 --- a/src/shared/services/remote.js +++ b/src/shared/services/remote.js @@ -35,9 +35,10 @@ function request (method, url, data = null, extraHeaders = {}) { }).then(checkStatus) } -function get (url) { +function get (url, headers = {}) { return fetch(url, { - method: 'get' + method: 'get', + headers }) .then(checkStatus) .then(function (response) {