From 9e2efb8d069f2f50ed970c01f9e449ea5dd021ca Mon Sep 17 00:00:00 2001 From: TBS093A Date: Mon, 17 May 2021 21:18:27 +0200 Subject: [PATCH] Docker -> ready to work on remote --- .dockerignore | 1 - .gitignore | 2 +- Dockerfile | 24 +++---------------- .../asyncThunks/abstracts/abstractAddress.js | 2 +- .../asyncThunks/abstracts/abstractService.js | 4 ++-- 5 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.dockerignore b/.dockerignore index b99378e..0a03045 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,2 @@ node_modules/ -.cache/ public/ diff --git a/.gitignore b/.gitignore index 557f97c..b99378e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/ .cache/ -public +public/ diff --git a/Dockerfile b/Dockerfile index 5830068..6912b40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,28 +10,10 @@ COPY package.json ./ COPY package-lock.json ./ RUN npm install --silent +RUN npm install gatsby-cli --silent + +ENV GATSBY_TELEMETRY_DISABLED=1 # add app COPY . ./ -CMD ["npm", "build"] - -# start app -CMD ["npm", "start"] - - - - - -# FROM node:14.4.0 - -# WORKDIR /usr/src/app - -# COPY package*.json ./ -# RUN npm install - -# COPY . . - -# RUN npm install -g gatsby-cli - -# CMD ['gatsby', 'develop', '-H', '0.0.0.0:8000'] diff --git a/src/redux/asyncThunks/abstracts/abstractAddress.js b/src/redux/asyncThunks/abstracts/abstractAddress.js index 0bd6cb8..3554bf6 100644 --- a/src/redux/asyncThunks/abstracts/abstractAddress.js +++ b/src/redux/asyncThunks/abstracts/abstractAddress.js @@ -1,3 +1,3 @@ -let API = 'localhost:9090' +let API = '0.0.0.0:9090' export const GeneralAddress = 'http://' + API export const GeneralAddressWS = 'ws://' + API + '/render' \ No newline at end of file diff --git a/src/redux/asyncThunks/abstracts/abstractService.js b/src/redux/asyncThunks/abstracts/abstractService.js index 51fe1c1..ddd2e8a 100644 --- a/src/redux/asyncThunks/abstracts/abstractService.js +++ b/src/redux/asyncThunks/abstracts/abstractService.js @@ -80,7 +80,7 @@ const headerBuilder = (url, method, token, body) => { 'authorization': token, 'x-csrftoken': getCookie('csrftoken'), 'accept': 'application/json', - 'content-type': 'application/json', + 'content-type': 'application/json' } let headers = { url: url, @@ -90,7 +90,7 @@ const headerBuilder = (url, method, token, body) => { } if (method === 'PUT' || method === 'POST' || method === 'PATCH') { headers = Object.assign({}, headers, { - data: JSON.stringify(body), + data: JSON.stringify(body) }) } return headers