deploy:部署修改
This commit is contained in:
parent
51e8ce5d84
commit
13898e190f
9
build.sh
Normal file → Executable file
9
build.sh
Normal file → Executable file
@ -1,11 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 配置统计key
|
# 配置统计key
|
||||||
export VUE_APP_QIEZI_HOST = "https://fleyx.com";
|
export VUE_APP_QIEZI_HOST="https://fleyx.com";
|
||||||
export VUE_APP_QIEZI_KEY = "aab3cad381f54ca5b7b9abeb2e09320a";
|
export VUE_APP_QIEZI_KEY="aab3cad381f54ca5b7b9abeb2e09320a";
|
||||||
|
|
||||||
base=$(cd "$(dirname "$0")";pwd)
|
base=$(cd "$(dirname "$0")";pwd)
|
||||||
|
echo $VUE_APP_QIEZI_HOST
|
||||||
|
echo $VUE_APP_QIEZI_KEY
|
||||||
|
#
|
||||||
# 前端打包
|
# 前端打包
|
||||||
docker run -it --rm --user ${UID} -v $base/qiezi_front:/opt/front node:lts-buster-slim bash -c "cd /opt/front && yarn --registry https://registry.npm.taobao.org && yarn build"
|
docker run -it --rm --user ${UID} -e VUE_APP_QIEZI_HOST=${VUE_APP_QIEZI_HOST} -e VUE_APP_QIEZI_KEY=${VUE_APP_QIEZI_KEY} -v $base/qiezi_front:/opt/front node:lts-buster-slim bash -c "cd /opt/front && yarn --registry https://registry.npm.taobao.org && yarn build"
|
||||||
# 后端打包
|
# 后端打包
|
||||||
docker run -it --rm --user ${UID} -v $base/data/maven/mavenRep:/var/maven/.m2: -v $base/data/maven/settings.xml:/usr/share/maven/conf/settings.xml -v $base/qieziBackend:/code maven:3-openjdk-11-slim bash -c "cd /code && mvn clean install"
|
docker run -it --rm --user ${UID} -v $base/data/maven/mavenRep:/var/maven/.m2: -v $base/data/maven/settings.xml:/usr/share/maven/conf/settings.xml -v $base/qieziBackend:/code maven:3-openjdk-11-slim bash -c "cd /code && mvn clean install"
|
||||||
|
|
||||||
|
@ -28,11 +28,16 @@ http {
|
|||||||
listen 8080;
|
listen 8080;
|
||||||
listen [::]:8080;
|
listen [::]:8080;
|
||||||
index index.html;
|
index index.html;
|
||||||
root /opt/dist/;
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
location /manage{
|
||||||
|
alias /opt/dist/;
|
||||||
|
index index.html;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /opt/dist/indexResource;
|
alias /opt/dist/indexResource/;
|
||||||
index index.html;
|
index index.html;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
@ -44,11 +49,7 @@ http {
|
|||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /manage{
|
|
||||||
root /opt/dist;
|
|
||||||
index index.html;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
<script src="/indexResource/qieziStatistic_v1.js" type="text/javascript"></script>
|
<script src="./indexResource/qieziStatistic_v1.js" type="text/javascript"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() => {
|
function () {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.type = "text/javascript";
|
script.type = "text/javascript";
|
||||||
script.defer = true;
|
script.defer = true;
|
||||||
@ -44,6 +44,7 @@
|
|||||||
key = temp;
|
key = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.Console(requestHost, key);
|
||||||
if (!key) {
|
if (!key) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<router-view />
|
<router-view />
|
||||||
|
|
||||||
<div style="">
|
<div style="">
|
||||||
<div id="qieziStatisticHtmlHostPv" style="display: inline-block; width: 50%; text-align: right">页面访问次数:<span id="qieziStatisticHtmlHostPvValue"></span>次 </div>
|
<div id="qieziStatisticHtmlHostPv" style="display: none; width: 50%; text-align: right">页面访问次数:<span id="qieziStatisticHtmlHostPvValue"></span>次 </div>
|
||||||
<div id="qieziStatisticHtmlHostUv" style="display: inline-block; width: 50%; text-align: left"> 总访客数:<span id="qieziStatisticHtmlHostUvValue"></span>人</div>
|
<div id="qieziStatisticHtmlHostUv" style="display: none; width: 50%; text-align: left"> 总访客数:<span id="qieziStatisticHtmlHostUvValue"></span>人</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -2,21 +2,22 @@ import { createRouter, createWebHashHistory } from "vue-router";
|
|||||||
import Home from "../views/Home.vue";
|
import Home from "../views/Home.vue";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
component: Home,
|
component: Home,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/application/sign",
|
path: "/application/sign",
|
||||||
name: "ApplicationSign",
|
name: "ApplicationSign",
|
||||||
component: () => import("../views/ApplicationSign"),
|
component: () => import("../views/ApplicationSign"),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes,
|
base: "manage",
|
||||||
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
//process.env.VUE_APP_QIEZI_HOST = "http://localhost:8080";
|
//process.env.VUE_APP_QIEZI_HOST = "http://localhost:8080";
|
||||||
//process.env.VUE_APP_QIEZI_KEY = "aab3cad381f54ca5b7b9abeb2e09320a";
|
//process.env.VUE_APP_QIEZI_KEY = "aab3cad381f54ca5b7b9abeb2e09320a";
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
publicPath:"/manage",
|
||||||
devServer: {
|
devServer: {
|
||||||
proxy: {
|
proxy: {
|
||||||
"/qiezi/api": {
|
"/qiezi/api": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user