Compare commits
No commits in common. "master" and "1.3" have entirely different histories.
24
DEPLOY.md
24
DEPLOY.md
@ -1,20 +1,12 @@
|
|||||||
本程序基于 docker 来进行部署,使用 docker-compose 管理服务。
|
本程序基于 docker 来进行部署,使用 docker-compose 管理服务。
|
||||||
|
|
||||||
|
部署过程如下:
|
||||||
|
|
||||||
**注意,仅在 x86 环境下测试,arm下不保证可用性(目前测试可用)**
|
**注意,仅在 x86 环境下测试,arm下不保证可用性(目前测试可用)**
|
||||||
|
|
||||||
## 首次部署
|
1. 安装新版的 docker,docker-compose,zip(注意:以下操作均在项目根目录下执行)
|
||||||
|
2. 修改.env 文件中的参数,改为你的实际配置
|
||||||
0. 克隆代码`git clone https://github.com/FleyX/bookmark.git`
|
3. 修改`浏览器插件/bookmarkBrowserPlugin/static/js/config.js`中的 bookmarkHost,改为你的实际部署路径
|
||||||
1. 进入文件夹`cd bookmark`
|
4. 修改`浏览器插件/bookmarkBrowserPlugin/tab/index.html`中的`<meta http-equiv="Refresh" content="0;url=https://bm.fleyx.com" />`,将 url 改为你的实际部署地址
|
||||||
2. 安装新版的 docker,docker-compose,zip `apt install docker docker-compose zip`
|
5. 执行`build.sh`编译前后端代码
|
||||||
3. 修改.env 文件中的参数,改为你的实际配置
|
6. root 权限运行 `docker-compose up -d` 启动服务。
|
||||||
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` 启动服务
|
|
||||||
|
21
README.md
21
README.md
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
在线使用地址(长期提供服务):[bm.fleyx.com](https://bm.fleyx.com),
|
在线使用地址(长期提供服务):[bm.fleyx.com](https://bm.fleyx.com),
|
||||||
|
|
||||||
**为获得更好的体验,建议将主页设置为 bm.fleyx.com,并安装浏览器拓展,[点击查看如何安装](https://blog.fleyx.com/blog/detail/20220329/#%e6%b5%8f%e8%a7%88%e5%99%a8%e6%8f%92%e4%bb%b6)**
|
**为获得更好的体验,建议将主页设置为 fleyx.com,并安装浏览器拓展,[点击查看如何安装](https://blog.fleyx.com/blog/detail/20220329/#%e6%b5%8f%e8%a7%88%e5%99%a8%e6%8f%92%e4%bb%b6)**
|
||||||
|
|
||||||
也可自己部署搭建,教程见:[docker-compose 部署](https://github.com/FleyX/bookmark/blob/master/DEPLOY.md)
|
也可自己部署搭建,教程见:[docker-compose 部署](https://github.com/FleyX/bookmark/blob/master/DEPLOY.md)
|
||||||
|
|
||||||
@ -22,25 +22,9 @@
|
|||||||
|
|
||||||
帮助文档:[点击跳转](https://blog.fleyx.com/blog/detail/20220329/)
|
帮助文档:[点击跳转](https://blog.fleyx.com/blog/detail/20220329/)
|
||||||
|
|
||||||
- 支持从 chrome,edge,firefox 等浏览器导入书签数据。
|
|
||||||
- 支持从 OneEnv 导入书签数据
|
|
||||||
- 树型多级目录支持
|
|
||||||
- 支持导出标准 html 书签文件
|
|
||||||
- 强大的检索功能,支持拼音检索
|
|
||||||
- 支持浏览器插件,安装插件以后可右键添加书签
|
|
||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
## 1.4.1
|
## 2023-08-13
|
||||||
|
|
||||||
- 修复书签名过长无法导入问题
|
|
||||||
|
|
||||||
## 1.4
|
|
||||||
|
|
||||||
- 优化首图加载逻辑
|
|
||||||
- 支持 OneEnv 备份文件导入
|
|
||||||
|
|
||||||
## 1.3
|
|
||||||
|
|
||||||
![pic](https://s3.fleyx.com/picbed/2023/08/Snipaste_2023-08-13_15-01-20.png)
|
![pic](https://s3.fleyx.com/picbed/2023/08/Snipaste_2023-08-13_15-01-20.png)
|
||||||
|
|
||||||
@ -48,6 +32,7 @@
|
|||||||
|
|
||||||
位置:右上角个人中心-管理搜索引擎
|
位置:右上角个人中心-管理搜索引擎
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- [x] 主页功能
|
- [x] 主页功能
|
||||||
|
@ -29,11 +29,6 @@
|
|||||||
<artifactId>pinyin</artifactId>
|
<artifactId>pinyin</artifactId>
|
||||||
<version>0.3.1</version>
|
<version>0.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.xerial</groupId>
|
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
|
||||||
<version>3.44.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public class BookmarkController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping("/uploadBookmarkFile")
|
@RequestMapping("/uploadBookmarkFile")
|
||||||
public Result uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("path") String path) throws Exception {
|
public Result uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("path") String path) throws Exception {
|
||||||
bookmarkService.parseBookmarkFile(UserContextHolder.get().getUserId(), file, path);
|
bookmarkService.parseBookmarkFile(UserContextHolder.get().getUserId(), file.getInputStream(), path);
|
||||||
return Result.success(null);
|
return Result.success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package com.fanxb.bookmark.business.bookmark.service;
|
|||||||
import com.fanxb.bookmark.business.bookmark.entity.BookmarkEs;
|
import com.fanxb.bookmark.business.bookmark.entity.BookmarkEs;
|
||||||
import com.fanxb.bookmark.business.bookmark.entity.MoveNodeBody;
|
import com.fanxb.bookmark.business.bookmark.entity.MoveNodeBody;
|
||||||
import com.fanxb.bookmark.common.entity.po.Bookmark;
|
import com.fanxb.bookmark.common.entity.po.Bookmark;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -55,7 +54,7 @@ public interface BookmarkService {
|
|||||||
* @author fanxb
|
* @author fanxb
|
||||||
* @date 2019/7/9 18:44
|
* @date 2019/7/9 18:44
|
||||||
*/
|
*/
|
||||||
void parseBookmarkFile(int userId, MultipartFile file, String path) throws Exception;
|
void parseBookmarkFile(int userId, InputStream stream, String path) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 详情
|
* Description: 详情
|
||||||
|
@ -2,8 +2,10 @@ package com.fanxb.bookmark.business.bookmark.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
import cn.hutool.core.codec.Base64Decoder;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.*;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
|
import cn.hutool.core.util.CharsetUtil;
|
||||||
import cn.hutool.core.util.HashUtil;
|
import cn.hutool.core.util.HashUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.fanxb.bookmark.business.api.UserApi;
|
import com.fanxb.bookmark.business.api.UserApi;
|
||||||
import com.fanxb.bookmark.business.bookmark.constant.FileConstant;
|
import com.fanxb.bookmark.business.bookmark.constant.FileConstant;
|
||||||
@ -36,24 +38,17 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.awt.print.Book;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.SocketTimeoutException;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.DriverManager;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.Statement;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -86,25 +81,18 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void parseBookmarkFile(int userId, MultipartFile file, String path) throws Exception {
|
public void parseBookmarkFile(int userId, InputStream stream, String path) throws Exception {
|
||||||
List<Bookmark> bookmarks = new ArrayList<>();
|
Document doc = Jsoup.parse(stream, "utf-8", "");
|
||||||
|
Elements elements = doc.select("html>body>dl>dt");
|
||||||
//获取当前层sort最大值
|
//获取当前层sort最大值
|
||||||
Integer sortBase = bookmarkDao.selectMaxSort(userId, path);
|
Integer sortBase = bookmarkDao.selectMaxSort(userId, path);
|
||||||
if (sortBase == null) {
|
if (sortBase == null) {
|
||||||
sortBase = 0;
|
sortBase = 0;
|
||||||
}
|
}
|
||||||
if (file.getOriginalFilename().endsWith(".db3")) {
|
List<Bookmark> bookmarks = new ArrayList<>();
|
||||||
//处理db文件
|
|
||||||
readFromOneEnv(bookmarks, userId, file, path, sortBase);
|
|
||||||
} else {
|
|
||||||
InputStream stream = file.getInputStream();
|
|
||||||
Document doc = Jsoup.parse(stream, "utf-8", "");
|
|
||||||
Elements elements = doc.select("html>body>dl>dt");
|
|
||||||
for (int i = 0, length = elements.size(); i < length; i++) {
|
for (int i = 0, length = elements.size(); i < length; i++) {
|
||||||
dealBookmark(userId, elements.get(i), path, sortBase + i, bookmarks);
|
dealBookmark(userId, elements.get(i), path, sortBase + i, bookmarks);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//每一千条处理插入一次,批量更新搜索字段
|
//每一千条处理插入一次,批量更新搜索字段
|
||||||
List<Bookmark> tempList = new ArrayList<>(1000);
|
List<Bookmark> tempList = new ArrayList<>(1000);
|
||||||
for (int i = 0; i < bookmarks.size(); i++) {
|
for (int i = 0; i < bookmarks.size(); i++) {
|
||||||
@ -163,57 +151,6 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理oneenv的导出
|
|
||||||
*
|
|
||||||
* @param bookmarks 书签列表
|
|
||||||
* @param userId 用户id
|
|
||||||
* @param file file
|
|
||||||
* @param path path
|
|
||||||
* @param sort sort
|
|
||||||
*/
|
|
||||||
private void readFromOneEnv(List<Bookmark> bookmarks, int userId, MultipartFile file, String path, int sort) {
|
|
||||||
String filePath = CommonConstant.fileSavePath + "/files/" + IdUtil.simpleUUID() + ".db3";
|
|
||||||
try {
|
|
||||||
file.transferTo(FileUtil.newFile(filePath));
|
|
||||||
try (Connection conn = DriverManager.getConnection("jdbc:sqlite:" + filePath)) {
|
|
||||||
Statement stat = conn.createStatement();
|
|
||||||
ResultSet rs = stat.executeQuery("select * from on_categorys");
|
|
||||||
Map<Long, Bookmark> folderMap = new HashMap<>();
|
|
||||||
Map<Long, Integer> childSortBaseMap = new HashMap<>();
|
|
||||||
while (rs.next()) {
|
|
||||||
long addTime = rs.getLong("add_time");
|
|
||||||
Bookmark folder = new Bookmark(userId, path, StrUtil.nullToEmpty(rs.getString("name")), addTime == 0 ? System.currentTimeMillis() : addTime * 1000, sort++);
|
|
||||||
int childSortBase = 0;
|
|
||||||
if (insertOne(folder)) {
|
|
||||||
childSortBase = ObjectUtil.defaultIfNull(bookmarkDao.selectMaxSort(userId, path), 0);
|
|
||||||
}
|
|
||||||
long id = rs.getLong("id");
|
|
||||||
folderMap.put(id, folder);
|
|
||||||
childSortBaseMap.put(id, childSortBase);
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
rs = stat.executeQuery("select * from on_links");
|
|
||||||
while (rs.next()) {
|
|
||||||
long fId = rs.getLong("fid");
|
|
||||||
long addTime = rs.getLong("add_time");
|
|
||||||
int tempSort = childSortBaseMap.get(fId);
|
|
||||||
childSortBaseMap.put(fId, tempSort + 1);
|
|
||||||
Bookmark folder = folderMap.get(fId);
|
|
||||||
String curPath = folder == null ? "" : folder.getPath() + "." + folder.getBookmarkId();
|
|
||||||
Bookmark bookmark = new Bookmark(userId, curPath, StrUtil.nullToEmpty(rs.getString("title"))
|
|
||||||
, StrUtil.nullToEmpty(rs.getString("url")), "", addTime == 0 ? System.currentTimeMillis() : addTime * 1000, tempSort);
|
|
||||||
bookmarks.add(bookmark);
|
|
||||||
insertOne(bookmark);
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
stat.close();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 插入一条书签,如果已经存在同名书签将跳过
|
* Description: 插入一条书签,如果已经存在同名书签将跳过
|
||||||
*
|
*
|
||||||
@ -281,14 +218,11 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
bookmark.setUserId(userId);
|
bookmark.setUserId(userId);
|
||||||
bookmark.setCreateTime(System.currentTimeMillis());
|
bookmark.setCreateTime(System.currentTimeMillis());
|
||||||
bookmark.setAddTime(bookmark.getCreateTime());
|
bookmark.setAddTime(bookmark.getCreateTime());
|
||||||
bookmark.setIcon(bookmark.getType() == 1 ? "" : getIconPath(bookmark.getUrl(), bookmark.getIcon(), bookmark.getIconUrl(), true));
|
bookmark.setIcon(getIconPath(bookmark.getUrl(), bookmark.getIcon(), bookmark.getIconUrl()));
|
||||||
//文件夹和书签都建立搜索key
|
//文件夹和书签都建立搜索key
|
||||||
pinYinService.changeBookmark(bookmark);
|
pinYinService.changeBookmark(bookmark);
|
||||||
bookmarkDao.insertOne(bookmark);
|
bookmarkDao.insertOne(bookmark);
|
||||||
userApi.versionPlus(userId);
|
userApi.versionPlus(userId);
|
||||||
if (StrUtil.isEmpty(bookmark.getIcon()) && bookmark.getType() == 0) {
|
|
||||||
updateIconAsync(bookmark.getBookmarkId(), bookmark.getUrl(), userId);
|
|
||||||
}
|
|
||||||
return bookmark;
|
return bookmark;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,33 +232,13 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
bookmark.setUserId(userId);
|
bookmark.setUserId(userId);
|
||||||
if (bookmark.getType() == 0) {
|
if (bookmark.getType() == 0) {
|
||||||
pinYinService.changeBookmark(bookmark);
|
pinYinService.changeBookmark(bookmark);
|
||||||
bookmark.setIcon(getIconPath(bookmark.getUrl(), null, null, true));
|
bookmark.setIcon(getIconPath(bookmark.getUrl(), null, null));
|
||||||
if (StrUtil.isEmpty(bookmark.getIcon())) {
|
|
||||||
updateIconAsync(bookmark.getBookmarkId(), bookmark.getUrl(), userId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bookmarkDao.editBookmark(bookmark);
|
bookmarkDao.editBookmark(bookmark);
|
||||||
userApi.versionPlus(userId);
|
userApi.versionPlus(userId);
|
||||||
return bookmark.getIcon();
|
return bookmark.getIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 异步更新书签icon
|
|
||||||
*
|
|
||||||
* @param id 书签id
|
|
||||||
* @param url 书签url
|
|
||||||
* @param userId userId
|
|
||||||
*/
|
|
||||||
private void updateIconAsync(int id, String url, int userId) {
|
|
||||||
ThreadPoolUtil.execute(() -> {
|
|
||||||
String icon = getIconPath(url, null, null, false);
|
|
||||||
if (StrUtil.isEmpty(icon)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bookmarkDao.updateIcon(id, icon);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ -374,10 +288,10 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
int size = 100;
|
int size = 100;
|
||||||
int start = 0;
|
int start = 0;
|
||||||
List<Bookmark> deal;
|
List<Bookmark> deal;
|
||||||
while (!(deal = bookmarkDao.selectUserNoIcon(userId, start, size)).isEmpty()) {
|
while ((deal = bookmarkDao.selectUserNoIcon(userId, start, size)).size() > 0) {
|
||||||
start += size;
|
start += size;
|
||||||
deal.forEach(item -> {
|
deal.forEach(item -> {
|
||||||
String icon = getIconPath(item.getUrl(), null, null, false);
|
String icon = getIconPath(item.getUrl(), null, null);
|
||||||
if (StrUtil.isNotEmpty(icon)) {
|
if (StrUtil.isNotEmpty(icon)) {
|
||||||
bookmarkDao.updateIcon(item.getBookmarkId(), icon);
|
bookmarkDao.updateIcon(item.getBookmarkId(), icon);
|
||||||
}
|
}
|
||||||
@ -411,14 +325,13 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
/**
|
/**
|
||||||
* 获取icon,通过网络获取,或者从base64还原
|
* 获取icon,通过网络获取,或者从base64还原
|
||||||
*
|
*
|
||||||
* @param url 书签url路径
|
* @param url url
|
||||||
* @param icon base64编码的icon
|
* @param icon icon
|
||||||
* @param iconUrl base64编码的文件,文件名,用于获取文件名后缀
|
* @param iconUrl iconUrl
|
||||||
* @param quick 是否快速获取
|
|
||||||
* @return {@link String}
|
* @return {@link String}
|
||||||
* @author fanxb
|
* @author fanxb
|
||||||
*/
|
*/
|
||||||
private String getIconPath(String url, String icon, String iconUrl, boolean quick) {
|
private String getIconPath(String url, String icon, String iconUrl) {
|
||||||
String host;
|
String host;
|
||||||
try {
|
try {
|
||||||
URL urlObj = new URL(url);
|
URL urlObj = new URL(url);
|
||||||
@ -445,7 +358,7 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
return iconPath;
|
return iconPath;
|
||||||
}
|
}
|
||||||
//再根据url解析
|
//再根据url解析
|
||||||
iconPath = saveFile(host, urlIconAddress + "/icon?url=" + host + "&size=16..128..256", quick);
|
iconPath = saveFile(host, urlIconAddress + "/icon?url=" + host + "&size=16..128..256");
|
||||||
if (StrUtil.isNotEmpty(iconPath)) {
|
if (StrUtil.isNotEmpty(iconPath)) {
|
||||||
hostIconDao.insert(host, iconPath);
|
hostIconDao.insert(host, iconPath);
|
||||||
}
|
}
|
||||||
@ -457,12 +370,11 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
*
|
*
|
||||||
* @param host host
|
* @param host host
|
||||||
* @param url url
|
* @param url url
|
||||||
* @param quick 是否快速获取,快速获取超时时间1s
|
|
||||||
* @return {@link String}
|
* @return {@link String}
|
||||||
* @author FleyX
|
* @author FleyX
|
||||||
*/
|
*/
|
||||||
private String saveFile(String host, String url, boolean quick) {
|
private String saveFile(String host, String url) {
|
||||||
try (Response res = (quick ? HttpUtil.getSHORT_CLIENT() : HttpUtil.getClient(false)).newCall(new Request.Builder().url(url)
|
try (Response res = HttpUtil.getClient(false).newCall(new Request.Builder().url(url)
|
||||||
.header("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36")
|
.header("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36")
|
||||||
.get().build()).execute()) {
|
.get().build()).execute()) {
|
||||||
assert res.body() != null;
|
assert res.body() != null;
|
||||||
@ -476,8 +388,6 @@ public class BookmarkServiceImpl implements BookmarkService {
|
|||||||
} else {
|
} else {
|
||||||
log.info("未获取到icon:{}", url);
|
log.info("未获取到icon:{}", url);
|
||||||
}
|
}
|
||||||
} catch (SocketTimeoutException timeoutException) {
|
|
||||||
log.info("获取icon超时:{}", host);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("url获取icon故障:{}", url, e);
|
log.error("url获取icon故障:{}", url, e);
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,12 @@
|
|||||||
<artifactId>bookmark-common</artifactId>
|
<artifactId>bookmark-common</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,44 +74,44 @@
|
|||||||
<version>8.0.33</version>
|
<version>8.0.33</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <!–邮件依赖–>-->
|
<!--邮件依赖-->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
<groupId>org.springframework.boot</groupId>
|
||||||
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!-- <!–减负依赖–>-->
|
<!--减负依赖-->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.projectlombok</groupId>-->
|
<groupId>org.projectlombok</groupId>
|
||||||
<!-- <artifactId>lombok</artifactId>-->
|
<artifactId>lombok</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
<!-- <!–json工具依赖–>-->
|
<!--json工具依赖-->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>com.alibaba</groupId>-->
|
<groupId>com.alibaba</groupId>
|
||||||
<!-- <artifactId>fastjson</artifactId>-->
|
<artifactId>fastjson</artifactId>
|
||||||
<!-- <version>1.2.83</version>-->
|
<version>1.2.83</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.elasticsearch.client</groupId>-->
|
<groupId>org.elasticsearch.client</groupId>
|
||||||
<!-- <artifactId>elasticsearch-rest-high-level-client</artifactId>-->
|
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>cn.hutool</groupId>-->
|
<groupId>cn.hutool</groupId>
|
||||||
<!-- <artifactId>hutool-all</artifactId>-->
|
<artifactId>hutool-all</artifactId>
|
||||||
<!-- <version>5.8.21</version>-->
|
<version>5.8.21</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!--单元测试-->
|
<!--单元测试-->
|
||||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
|
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
|
||||||
<!--mysql jdbc依赖-->
|
<!--mysql jdbc依赖-->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>mysql</groupId>-->
|
<groupId>mysql</groupId>
|
||||||
<!-- <artifactId>mysql-connector-java</artifactId>-->
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<!-- <version>8.0.33</version>-->
|
<version>8.0.33</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!--邮件依赖-->
|
<!--邮件依赖-->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.8.25</version>
|
<version>5.8.21</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--单元测试-->
|
<!--单元测试-->
|
||||||
|
@ -53,7 +53,7 @@ public class Bookmark {
|
|||||||
this.setUserId(userId);
|
this.setUserId(userId);
|
||||||
this.setPath(path);
|
this.setPath(path);
|
||||||
this.setType(FOLDER_TYPE);
|
this.setType(FOLDER_TYPE);
|
||||||
this.setName(name.length() > 2000 ? name.substring(0, 1999) : name);
|
this.setName(name);
|
||||||
this.setAddTime(addTime);
|
this.setAddTime(addTime);
|
||||||
this.setSort(sort);
|
this.setSort(sort);
|
||||||
this.setCreateTime(System.currentTimeMillis());
|
this.setCreateTime(System.currentTimeMillis());
|
||||||
@ -64,7 +64,7 @@ public class Bookmark {
|
|||||||
this.setUserId(userId);
|
this.setUserId(userId);
|
||||||
this.setPath(path);
|
this.setPath(path);
|
||||||
this.setType(BOOKMARK_TYPE);
|
this.setType(BOOKMARK_TYPE);
|
||||||
this.setName(name.length() > 2000 ? name.substring(0, 1999) : name);
|
this.setName(name);
|
||||||
this.setUrl(url);
|
this.setUrl(url);
|
||||||
this.setIcon(icon);
|
this.setIcon(icon);
|
||||||
this.setSort(sort);
|
this.setSort(sort);
|
||||||
|
@ -2,11 +2,8 @@ package com.fanxb.bookmark.common.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUnit;
|
import cn.hutool.core.date.DateUnit;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.fanxb.bookmark.common.constant.CommonConstant;
|
|
||||||
import com.fanxb.bookmark.common.constant.NumberConstant;
|
import com.fanxb.bookmark.common.constant.NumberConstant;
|
||||||
import com.fanxb.bookmark.common.constant.RedisConstant;
|
import com.fanxb.bookmark.common.constant.RedisConstant;
|
||||||
import com.fanxb.bookmark.common.dao.GlobalConfigDao;
|
import com.fanxb.bookmark.common.dao.GlobalConfigDao;
|
||||||
@ -15,16 +12,11 @@ import com.fanxb.bookmark.common.entity.vo.GlobalConfigVo;
|
|||||||
import com.fanxb.bookmark.common.service.ConfigService;
|
import com.fanxb.bookmark.common.service.ConfigService;
|
||||||
import com.fanxb.bookmark.common.util.HttpUtil;
|
import com.fanxb.bookmark.common.util.HttpUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import okhttp3.Request;
|
|
||||||
import okhttp3.Response;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.StandardOpenOption;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -69,7 +61,9 @@ public class ConfigServiceImpl implements ConfigService {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
str = getBingImg();
|
str = getBingImg();
|
||||||
|
if (str != null) {
|
||||||
stringRedisTemplate.opsForValue().set(RedisConstant.BING_IMG, str, 2, TimeUnit.HOURS);
|
stringRedisTemplate.opsForValue().set(RedisConstant.BING_IMG, str, 2, TimeUnit.HOURS);
|
||||||
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,19 +71,11 @@ public class ConfigServiceImpl implements ConfigService {
|
|||||||
try {
|
try {
|
||||||
JSONObject bingObj = HttpUtil.getObj(bingHost + bingUrl, null, false);
|
JSONObject bingObj = HttpUtil.getObj(bingHost + bingUrl, null, false);
|
||||||
String path = bingObj.getJSONArray("images").getJSONObject(0).getString("url");
|
String path = bingObj.getJSONArray("images").getJSONObject(0).getString("url");
|
||||||
String picUrl = bingHost + path;
|
return bingHost + path;
|
||||||
Request request = new Request.Builder().url(picUrl).build();
|
|
||||||
try (Response res = HttpUtil.getClient(false).newCall(request).execute()) {
|
|
||||||
byte[] bytes = res.body().bytes();
|
|
||||||
String filePath = CommonConstant.fileSavePath + "/files/public/bing.jpg";
|
|
||||||
FileUtil.writeBytes(bytes, filePath);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取bing每日一图错误:{}", e.getLocalizedMessage(), e);
|
log.error("获取bing每日一图错误:{}", e.getLocalizedMessage(), e);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
return null;
|
||||||
log.error("获取bing每日一图错误:{}", e.getLocalizedMessage(), e);
|
|
||||||
}
|
|
||||||
return "/files/public/bing.jpg";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,14 +53,6 @@ public class HttpUtil {
|
|||||||
.readTimeout(60, TimeUnit.SECONDS)
|
.readTimeout(60, TimeUnit.SECONDS)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
/**
|
|
||||||
* 超时时间1s
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
private static final OkHttpClient SHORT_CLIENT = new OkHttpClient.Builder().connectTimeout(1, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(1, TimeUnit.SECONDS)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取客户端
|
* 获取客户端
|
||||||
*
|
*
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.17</version>
|
<version>2.7.14</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
alter table bookmark
|
|
||||||
modify name varchar(2000) not null;
|
|
1
bookmark_front/.gitignore
vendored
1
bookmark_front/.gitignore
vendored
@ -24,4 +24,3 @@ pnpm-debug.log*
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
|
@ -6,21 +6,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App"
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import "./global.less";
|
@import "./global.less";
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -29,7 +20,6 @@ body {
|
|||||||
background-color: @bgColor;
|
background-color: @bgColor;
|
||||||
height: initial;
|
height: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
:data="{ path: form.path }"
|
:data="{ path: form.path }"
|
||||||
:headers="{ 'jwt-token': token }"
|
:headers="{ 'jwt-token': token }"
|
||||||
action="/bookmark/api/bookmark/uploadBookmarkFile"
|
action="/bookmark/api/bookmark/uploadBookmarkFile"
|
||||||
accept=".html,.db3"
|
|
||||||
@change="fileChange"
|
@change="fileChange"
|
||||||
>
|
>
|
||||||
<p class="ant-upload-drag-icon">
|
<p class="ant-upload-drag-icon">
|
||||||
|
@ -110,6 +110,5 @@ export default {
|
|||||||
get,
|
get,
|
||||||
post,
|
post,
|
||||||
put,
|
put,
|
||||||
delete: deletes,
|
delete: deletes
|
||||||
http
|
|
||||||
};
|
};
|
||||||
|
@ -5,23 +5,18 @@
|
|||||||
源码地址:
|
源码地址:
|
||||||
<a href="https://github.com/FleyX/bookmark" target="_blank">github.com/FleyX/bookmark</a>
|
<a href="https://github.com/FleyX/bookmark" target="_blank">github.com/FleyX/bookmark</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
当前版本:{{ appVersion }}  <a v-if="showNewVersion"
|
|
||||||
href="https://github.com/FleyX/bookmark/blob/master/DEPLOY.md">最新版本:{{ latestVersion
|
|
||||||
}}</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
使用教程:
|
使用教程:
|
||||||
<a href="https://blog.fleyx.com/blog/detail/20220329" target="_blank">点击跳转</a>
|
<a href="https://blog.fleyx.com/blog/detail/20220329" target="_blank">点击跳转</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
浏览器插件:
|
浏览器插件:
|
||||||
<a href="/static/bookmarkBrowserPlugin.zip" download="浏览器插件.zip"
|
<a href="/static/bookmarkBrowserPlugin.zip" download="浏览器插件.zip" target="_blank">最新版本{{ serverConfig.map.pluginVersion }}(注意更新)</a>
|
||||||
target="_blank">最新版本{{ serverConfig.map.pluginVersion }}(注意更新)</a>
|
|
||||||
,使用详情请参考使用教程
|
,使用详情请参考使用教程
|
||||||
</div>
|
</div>
|
||||||
<div>交流反馈qq群:150056494,邮箱:fleyx20@outlook.com</div>
|
<div>交流反馈qq群:150056494,邮箱:fleyx20@outlook.com</div>
|
||||||
<div>
|
<div>
|
||||||
|
统计:
|
||||||
<a href="https://qiezi.fleyx.com" style="" target="_blank">
|
<a href="https://qiezi.fleyx.com" style="" target="_blank">
|
||||||
<div id="qieziStatisticHtmlHostPv" style="display: none">
|
<div id="qieziStatisticHtmlHostPv" style="display: none">
|
||||||
总访问次数:
|
总访问次数:
|
||||||
@ -41,49 +36,27 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import { GLOBAL_CONFIG, SERVER_CONFIG } from "@/store/modules/globalConfig";
|
import { GLOBAL_CONFIG, SERVER_CONFIG } from "@/store/modules/globalConfig";
|
||||||
import httpUtil from "@/util/HttpUtil";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "about",
|
name: "about",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return { version: "" };
|
||||||
appVersion: "1.4", //应用版本
|
|
||||||
latestVersion: null,
|
|
||||||
showNewVersion: false
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: { ...mapState(GLOBAL_CONFIG, [SERVER_CONFIG]) },
|
computed: { ...mapState(GLOBAL_CONFIG, [SERVER_CONFIG]) },
|
||||||
async mounted() {
|
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);
|
||||||
|
|
||||||
|
let serverConfig = this.$store.state[GLOBAL_CONFIG + "/" + SERVER_CONFIG];
|
||||||
//获取最新版本
|
console.log(serverConfig);
|
||||||
let res = await httpUtil.http.default.get("https://s3.fleyx.com/picbed/bookmark/config.json");
|
if (serverConfig.map.pluginVersion) {
|
||||||
console.log(res);
|
this.version = serverConfig.map.pluginVersion;
|
||||||
this.latestVersion = res.data.latestAppVersion;
|
}
|
||||||
this.showNewVersion = this.checkVersion(this.appVersion, this.latestVersion);
|
|
||||||
},
|
},
|
||||||
methods: {
|
};
|
||||||
checkVersion: function(version, latestVersion) {
|
|
||||||
if (version === latestVersion) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@ -4,7 +4,6 @@ module.exports = {
|
|||||||
devtool: "source-map"
|
devtool: "source-map"
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 4531,
|
|
||||||
proxy: {
|
proxy: {
|
||||||
"/bookmark/api": {
|
"/bookmark/api": {
|
||||||
//这里最好有一个 /
|
//这里最好有一个 /
|
||||||
|
2
build.sh
2
build.sh
@ -10,4 +10,4 @@ cd ../../
|
|||||||
# 前端打包
|
# 前端打包
|
||||||
docker run --rm --user ${UID} -v $base/bookmark_front:/opt/front node:16-slim bash -c "cd /opt/front && yarn --registry https://registry.npm.taobao.org && yarn build"
|
docker run --rm --user ${UID} -v $base/bookmark_front:/opt/front node:16-slim bash -c "cd /opt/front && yarn --registry https://registry.npm.taobao.org && yarn build"
|
||||||
# 后端打包
|
# 后端打包
|
||||||
docker run --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/bookMarkService:/code maven:3-openjdk-11-slim bash -c "cd /code && mvn clean install"
|
docker run --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/bookMarkService:/code maven:3-openjdk-11-slim bash -c "cd /code && mvn clean install"
|
@ -14,7 +14,6 @@ services:
|
|||||||
- ./data/mysql/my.cnf:/etc/mysql/my.cnf
|
- ./data/mysql/my.cnf:/etc/mysql/my.cnf
|
||||||
- /etc/localtime:/etc/localtime
|
- /etc/localtime:/etc/localtime
|
||||||
- ./data/timezone:/etc/timezone
|
- ./data/timezone:/etc/timezone
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_DATABASE=bookmark
|
- MYSQL_DATABASE=bookmark
|
||||||
@ -26,7 +25,6 @@ services:
|
|||||||
- /etc/localtime:/etc/localtime
|
- /etc/localtime:/etc/localtime
|
||||||
- ./data/timezone:/etc/timezone
|
- ./data/timezone:/etc/timezone
|
||||||
- ./data/redis:/data
|
- ./data/redis:/data
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
networks:
|
||||||
- bookmark
|
- bookmark
|
||||||
|
|
||||||
@ -40,7 +38,6 @@ services:
|
|||||||
- ./bookmark_front/dist:/opt/dist
|
- ./bookmark_front/dist:/opt/dist
|
||||||
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
|
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ${BOOKMARK_FILE_SAVE_PATH}/files/public:/opt/files/public
|
- ${BOOKMARK_FILE_SAVE_PATH}/files/public:/opt/files/public
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
|
|
||||||
@ -63,7 +60,6 @@ services:
|
|||||||
- ./bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
- ./bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
||||||
- ${BOOKMARK_FILE_SAVE_PATH}:/opt/files
|
- ${BOOKMARK_FILE_SAVE_PATH}:/opt/files
|
||||||
working_dir: /opt/app
|
working_dir: /opt/app
|
||||||
restart: unless-stopped
|
|
||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -c
|
- -c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user