feat: add docker support and update deps

This commit is contained in:
divlo
2020-10-30 16:58:27 +01:00
parent f5a8be5000
commit ffec0058e5
35 changed files with 5006 additions and 4502 deletions

View File

@@ -2,11 +2,15 @@ import axios from 'axios'
export const API_URL = process.env.NEXT_PUBLIC_API_URL
const api = axios.create({
baseURL: API_URL,
headers: {
'Content-Type': 'application/json'
}
})
const api = (() => {
const baseURL =
typeof window === 'undefined' ? process.env.CONTAINER_API_URL : API_URL
return axios.create({
baseURL,
headers: {
'Content-Type': 'application/json'
}
})
})()
export default api