-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
132 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
本程序基于 docker 来进行部署,使用 docker-compose 管理服务。 | ||
|
||
部署过程如下: | ||
**注意,仅在 x86 环境下测试,arm 下不保证可用性(目前测试可用)** | ||
|
||
**注意,仅在 x86 环境下测试,arm下不保证可用性(目前测试可用)** | ||
## 首次部署 | ||
|
||
1. 安装新版的 docker,docker-compose,zip(注意:以下操作均在项目根目录下执行) | ||
2. 修改.env 文件中的参数,改为你的实际配置 | ||
3. 修改`浏览器插件/bookmarkBrowserPlugin/static/js/config.js`中的 bookmarkHost,改为你的实际部署路径 | ||
4. 修改`浏览器插件/bookmarkBrowserPlugin/tab/index.html`中的`<meta http-equiv="Refresh" content="0;url=https://bm.fleyx.com" />`,将 url 改为你的实际部署地址 | ||
5. 执行`build.sh`编译前后端代码 | ||
6. root 权限运行 `docker-compose up -d` 启动服务。 | ||
0. 克隆代码`git clone https://github.com/FleyX/bookmark.git` | ||
1. 进入文件夹`cd bookmark` | ||
2. 安装新版的 docker,docker-compose,zip `apt install docker docker-compose zip` | ||
3. 修改.env 文件中的参数,改为你的实际配置 | ||
4. 修改`浏览器插件/bookmarkBrowserPlugin/static/js/config.js`中的 bookmarkHost,改为你的实际部署路径 | ||
5. 修改`浏览器插件/bookmarkBrowserPlugin/tab/index.html`中的`<meta http-equiv="Refresh" content="0;url=https://bm.fleyx.com" />`,将 url 改为你的实际部署地址 | ||
6. 执行`build.sh`编译前后端代码 `bash build.sh` | ||
7. root 权限运行 `docker-compose up -d` 启动服务。 | ||
|
||
## 更新系统 | ||
|
||
0. 代码库更新`cd bookmark;git pull` | ||
1. 执行`build.sh`编译前后端代码 `bash build.sh` | ||
2. root 权限运行 `docker-compose restart` 启动服务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,18 +5,23 @@ | |
源码地址: | ||
<a href="https://github.com/FleyX/bookmark" target="_blank">github.com/FleyX/bookmark</a> | ||
</div> | ||
<div> | ||
当前版本:{{ appVersion }}  <a v-if="showNewVersion" | ||
href="https://github.com/FleyX/bookmark/blob/master/DEPLOY.md">最新版本:{{ latestVersion | ||
}}</a> | ||
</div> | ||
<div> | ||
使用教程: | ||
<a href="https://blog.fleyx.com/blog/detail/20220329" target="_blank">点击跳转</a> | ||
</div> | ||
<div> | ||
浏览器插件: | ||
<a href="/static/bookmarkBrowserPlugin.zip" download="浏览器插件.zip" target="_blank">最新版本{{ serverConfig.map.pluginVersion }}(注意更新)</a> | ||
<a href="/static/bookmarkBrowserPlugin.zip" download="浏览器插件.zip" | ||
target="_blank">最新版本{{ serverConfig.map.pluginVersion }}(注意更新)</a> | ||
,使用详情请参考使用教程 | ||
</div> | ||
<div>交流反馈qq群:150056494,邮箱:[email protected]</div> | ||
<div> | ||
统计: | ||
<a href="https://qiezi.fleyx.com" style="" target="_blank"> | ||
<div id="qieziStatisticHtmlHostPv" style="display: none"> | ||
总访问次数: | ||
|
@@ -36,27 +41,46 @@ | |
<script> | ||
import { mapState } from "vuex"; | ||
import { GLOBAL_CONFIG, SERVER_CONFIG } from "@/store/modules/globalConfig"; | ||
import httpUtil from "@/util/HttpUtil"; | ||
export default { | ||
name: "about", | ||
data() { | ||
return { version: "" }; | ||
return { | ||
appVersion: "1.4", //应用版本 | ||
latestVersion: null, | ||
showNewVersion: false | ||
}; | ||
}, | ||
computed: { ...mapState(GLOBAL_CONFIG, [SERVER_CONFIG]) }, | ||
mounted() { | ||
window.qieziStatisticKey = "b74c4b571b644782a837433209827874"; | ||
let script = document.createElement("script"); | ||
script.type = "text/javascript"; | ||
script.defer = true; | ||
script.src = "https://qiezi.fleyx.com/qiezijs/1.0/qiezi_statistic.min.js"; | ||
document.getElementsByTagName("head")[0].appendChild(script); | ||
async mounted() { | ||
let serverConfig = this.$store.state[GLOBAL_CONFIG + "/" + SERVER_CONFIG]; | ||
console.log(serverConfig); | ||
if (serverConfig.map.pluginVersion) { | ||
this.version = serverConfig.map.pluginVersion; | ||
} | ||
//获取最新版本 | ||
let res = await httpUtil.http.default.get("https://s3.fleyx.com/picbed/bookmark/config.json"); | ||
console.log(res); | ||
this.latestVersion = res.data.latestAppVersion; | ||
this.showNewVersion = this.checkVersion(this.appVersion, this.latestVersion); | ||
}, | ||
}; | ||
methods: { | ||
checkVersion: function(version, latestVersion) { | ||
let versions = version.split("."); | ||
let latestVersions = latestVersion.split("."); | ||
for (let i = 0; i < versions.length; i++) { | ||
if (i >= latestVersions.length) { | ||
return false; | ||
} | ||
let versionNum = parseInt(versions[i]); | ||
let latestVersionNum = parseInt(latestVersions[i]); | ||
if (versionNum !== latestVersionNum) { | ||
return versionNum < latestVersionNum; | ||
} | ||
} | ||
return true; | ||
} | ||
} | ||
} | ||
; | ||
</script> | ||
|
||
<style lang="less" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters