解决CDN异常
This commit is contained in:
parent
1449524d4e
commit
184347c4f9
@ -2,6 +2,7 @@ const pkg = require('./package')
|
|||||||
|
|
||||||
const DevBaseUrl = 'http://127.0.0.1:65534'
|
const DevBaseUrl = 'http://127.0.0.1:65534'
|
||||||
const ProdBashUrl = 'https://api.wyr.me'
|
const ProdBashUrl = 'https://api.wyr.me'
|
||||||
|
const ProdServerBashUrl = 'http://blog-service:65534'
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'universal',
|
mode: 'universal',
|
||||||
@ -95,7 +96,19 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
axios: {
|
axios: {
|
||||||
// See https://github.com/nuxt-community/axios-module#options
|
// See https://github.com/nuxt-community/axios-module#options
|
||||||
baseURL: process.env.NODE_ENV === 'development' ? DevBaseUrl : ProdBashUrl // 配置API接口地址
|
baseURL: process.env.NODE_ENV === 'development' ? DevBaseUrl : ProdServerBashUrl // 配置API接口地址
|
||||||
|
},
|
||||||
|
|
||||||
|
publicRuntimeConfig: {
|
||||||
|
axios: {
|
||||||
|
browserBaseURL: process.env.NODE_ENV === 'development' ? DevBaseUrl : ProdBashUrl
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
privateRuntimeConfig: {
|
||||||
|
axios: {
|
||||||
|
baseURL: process.env.NODE_ENV === 'development' ? DevBaseUrl : ProdServerBashUrl
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
12
package.json
12
package.json
@ -7,7 +7,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
|
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"start": "cross-env NODE_ENV=production HOST=0.0.0.0 PORT=80 node server/index.js",
|
"start": "cross-env NODE_ENV=production HOST=0.0.0.0 PORT=3000 node server/index.js",
|
||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --ignore-path .eslintignore .",
|
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --ignore-path .eslintignore .",
|
||||||
"precommit": "npm run lint"
|
"precommit": "npm run lint"
|
||||||
@ -18,13 +18,13 @@
|
|||||||
"@fortawesome/free-regular-svg-icons": "^5.12.0",
|
"@fortawesome/free-regular-svg-icons": "^5.12.0",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.12.0",
|
"@fortawesome/free-solid-svg-icons": "^5.12.0",
|
||||||
"@fortawesome/vue-fontawesome": "^0.1.8",
|
"@fortawesome/vue-fontawesome": "^0.1.8",
|
||||||
"@nuxtjs/axios": "^5.8.0",
|
"@nuxtjs/axios": "^5.12.4",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"element-ui": "^2.13.2",
|
"element-ui": "^2.13.2",
|
||||||
"highlight.js": "^9.17.1",
|
"highlight.js": "^9.17.1",
|
||||||
"koa": "^2.11.0",
|
"koa": "^2.13.0",
|
||||||
"moment": "^2.27.0",
|
"moment": "^2.27.0",
|
||||||
"nuxt": "^2.12.2",
|
"nuxt": "^2.14.12",
|
||||||
"remark": "^12.0.1",
|
"remark": "^12.0.1",
|
||||||
"strip-markdown": "^3.1.2",
|
"strip-markdown": "^3.1.2",
|
||||||
"v-viewer": "^1.5.1",
|
"v-viewer": "^1.5.1",
|
||||||
@ -52,4 +52,4 @@
|
|||||||
"stylus": "^0.54.7",
|
"stylus": "^0.54.7",
|
||||||
"stylus-loader": "^3.0.2"
|
"stylus-loader": "^3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
yarn run build
|
yarn run build
|
||||||
rsync -avr --delete-after --exclude ".git" . root@139.129.130.191:/root/site/blog-client && ssh root@139.129.130.191 'docker restart blog-client && docker restart blog-client1 && docker restart blog-client2 && docker restart blog-client3'
|
rsync -avr --delete-after --exclude ".git" . root@139.129.130.191:/root/site/blog-client && ssh root@139.129.130.191 'docker restart blog-client'
|
||||||
|
@ -13,7 +13,7 @@ async function start () {
|
|||||||
const nuxt = new Nuxt(config)
|
const nuxt = new Nuxt(config)
|
||||||
|
|
||||||
const {
|
const {
|
||||||
host = process.env.HOST || '127.0.0.1',
|
host = process.env.HOST || '0.0.0.0',
|
||||||
port = process.env.PORT || 3000
|
port = process.env.PORT || 3000
|
||||||
} = nuxt.options.server
|
} = nuxt.options.server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user