Docker -> fix conflicts
commit
1ba3a8117b
|
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
.cache/
|
.cache/
|
||||||
|
public/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
.cache/
|
.cache/
|
||||||
public
|
public/
|
||||||
|
|
|
||||||
20
Dockerfile
20
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 && \
|
# install app dependencies
|
||||||
cp -r /app/public/* /var/www/work_front/html/
|
|
||||||
|
|
||||||
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 . ./
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// let API = 'localhost:9090'
|
let API = '0.0.0.0:9090'
|
||||||
let API = 'render_app_backend:9090'
|
|
||||||
export const GeneralAddress = 'http://' + API
|
export const GeneralAddress = 'http://' + API
|
||||||
export const GeneralAddressWS = 'ws://' + API + '/render'
|
export const GeneralAddressWS = 'ws://' + API + '/render'
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ const headerBuilder = (url, method, token, body) => {
|
||||||
'authorization': token,
|
'authorization': token,
|
||||||
'x-csrftoken': getCookie('csrftoken'),
|
'x-csrftoken': getCookie('csrftoken'),
|
||||||
'accept': 'application/json',
|
'accept': 'application/json',
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json'
|
||||||
}
|
}
|
||||||
let headers = {
|
let headers = {
|
||||||
url: url,
|
url: url,
|
||||||
|
|
@ -90,7 +90,7 @@ const headerBuilder = (url, method, token, body) => {
|
||||||
}
|
}
|
||||||
if (method === 'PUT' || method === 'POST' || method === 'PATCH') {
|
if (method === 'PUT' || method === 'POST' || method === 'PATCH') {
|
||||||
headers = Object.assign({}, headers, {
|
headers = Object.assign({}, headers, {
|
||||||
data: JSON.stringify(body),
|
data: JSON.stringify(body)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return headers
|
return headers
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue