mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-03-04 04:43:10 +00:00
nats docker setup
This commit is contained in:
@@ -2,4 +2,5 @@ PROD_URL = "https://api.example.com"
|
||||
DEV_URL = "https://api.example.com"
|
||||
APP_URL = "https://app.example.com"
|
||||
DEV_HOST = 0.0.0.0
|
||||
DEV_PORT = 80
|
||||
DEV_PORT = 80
|
||||
DOCKER_BUILD = false
|
||||
@@ -29,7 +29,7 @@ module.exports = function () {
|
||||
|
||||
// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
|
||||
build: {
|
||||
env: { DEV_API: process.env.DEV_URL, PROD_API: process.env.PROD_URL },
|
||||
env: { DEV_API: process.env.DEV_URL, PROD_API: process.env.PROD_URL, DOCKER_BUILD: process.env.DOCKER_BUILD },
|
||||
vueRouterMode: 'history', // available values: 'hash', 'history'
|
||||
distDir: "dist/",
|
||||
|
||||
|
||||
@@ -5,9 +5,16 @@ export default function ({ router, store }) {
|
||||
|
||||
Vue.prototype.$axios = axios;
|
||||
|
||||
axios.defaults.baseURL = process.env.NODE_ENV === "production"
|
||||
? process.env.PROD_API || window._env_.PROD_URL
|
||||
: process.env.DEV_API;
|
||||
axios.defaults.baseURL = () => {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
if (process.env.DOCKER_BUILD) {
|
||||
return window._env_.PROD_URL
|
||||
}
|
||||
return process.env.PROD_API
|
||||
} else {
|
||||
return process.env.DEV_API;
|
||||
}
|
||||
}
|
||||
|
||||
axios.interceptors.request.use(
|
||||
function (config) {
|
||||
|
||||
Reference in New Issue
Block a user