Docker -> fix conflicts

feature/2_forms
TBS093A 2021-05-17 21:23:23 +02:00
commit 1ba3a8117b
5 changed files with 21 additions and 11 deletions

View File

@ -1,2 +1,3 @@
node_modules/
.cache/
public/

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
node_modules/
.cache/
public
public/

View File

@ -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
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 . ./

View File

@ -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'
export const GeneralAddressWS = 'ws://' + API + '/render'

View File

@ -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