Docker -> fix conflicts
commit
1ba3a8117b
|
|
@ -1,2 +1,3 @@
|
|||
node_modules/
|
||||
.cache/
|
||||
public/
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
node_modules/
|
||||
.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 && \
|
||||
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 . ./
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue