diff --git a/.dockerignore b/.dockerignore index cbf0615..b99378e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ 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 972681e..eff8807 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ -FROM nginx:1.19.0-alpine +# pull official base image +FROM node:13.12.0-alpine -COPY ./public /app/public +# set working directory +WORKDIR /app -RUN mkdir -p /var/www/work_front/html && \ - cp -r /app/public/* /var/www/work_front/html/ +# install app dependencies -COPY ./default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file +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 . ./ diff --git a/src/redux/asyncThunks/abstracts/abstractAddress.js b/src/redux/asyncThunks/abstracts/abstractAddress.js index d4a2f28..3e96248 100644 --- a/src/redux/asyncThunks/abstracts/abstractAddress.js +++ b/src/redux/asyncThunks/abstracts/abstractAddress.js @@ -1,4 +1,3 @@ -// let API = 'localhost:9090' -let API = 'render_app_backend: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 +export const GeneralAddressWS = 'ws://' + API + '/render' 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