Docker -> ready to work on remote
parent
37f7f6448e
commit
9e2efb8d06
|
|
@ -1,3 +1,2 @@
|
|||
node_modules/
|
||||
.cache/
|
||||
public/
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
node_modules/
|
||||
.cache/
|
||||
public
|
||||
public/
|
||||
|
|
|
|||
24
Dockerfile
24
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']
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -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