No Description

reghao 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago
account d1fdb7aca5 account-service 使用 cn.reghao.jutil.jdk.image 提供的 CaptchaUtil 4 months ago
auth 08a889cd37 将 jutil 项目的 auth 模块迁移到 tnb 4 months ago
common 4808a4f76e IdService 和 RandomUtil 放到 common 模块 4 months ago
content 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago
data a53a4dee38 使用 127.0.0.1 替换 localhost 5 months ago
eureka a53a4dee38 使用 127.0.0.1 替换 localhost 5 months ago
file 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago
gateway dbe4cfbed2 对应 cn.reghao.jutil 的依赖变更 4 months ago
message 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago
oss 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago
search d18eca513a 对应 cn.reghao.jutil 的依赖变更 4 months ago
user d18eca513a 对应 cn.reghao.jutil 的依赖变更 4 months ago
zzz 5802731c6b 调整 oss 相关模块 4 months ago
.gitignore 8c81a4cbfd update gitignore 5 months ago
README.md 752e343dab 调整 message, file, user 监听的端口 5 months ago
pom.xml 312a870468 调整 pom.xml 依赖, 只有 oss/oss-sdk 依赖 cn.reghao.jutil.tool 4 months ago

README.md

tnb

微服务实践, 本项目实现了一个类似 bilibili 的 VOD 系统后端

也包含 mall, exam, im, geo 等模块

前台应用包括 Web 应用和 Android 应用

分别由 tnbapp 项目和 tnbdroid 项目提供

依赖

  • os:Linux > Windows 系统理论上可以运行, 但尚未实践
  • jdk:11
  • maven:3.9
  • mysql:5.7
  • redis
  • rabbitmq
  • zookeeper:3.8.4
  • mongodb:4.4
  • elasticsearch:7.17.18 > 仅 search-service 依赖, 选用 lucene 则不再需要 elasticsearch
  • nacos-server:v2.4.1 > 仅 search-service 依赖

Spring 版本

模块

tnb 项目模块:

  • eureka:6060
  • gateway:6000
  • account:6001
  • message:6002
  • file:6003
  • user:6004
  • content:6005
  • data:6006
  • search:6007

构建部署

pull 项目源码

cd ~/Downloads
git clone https://git.reghao.cn/reghao/tnb.git

初始化 MySQL

cd ~/Downloads/tnb/zzz
bash db_init.sh

执行 db_init.sh 会自动创建 tnb 项目需要的数据库并初始化数据库表

需要自行指定 db_init.sh 脚本中的 host, username, password 等变量值

构建并运行

cd ~/Downloads/tnb/zzz
bash build_jar.sh

执行 db_init.sh 会自动构建并运行 tnb 项目各应用 jar 包

build_jar.sh 脚本中的 proj_dir 变量默认是 ~/Downloads/tnb

mvn 构建默认使用 dev 环境, 所以需要修改每个应用 resources/application-dev.yml 配置文件中的第三方服务配置

默认运行的是 jar 包, 也可构建并运行 docker 镜像, 详见 build_jar.sh 脚本的 build_image 和 exec_image 函数

停止应用

cd ~/Downloads/tnb/zzz
bash shutdown.sh

执行 shutdown.sh 会结束 tnb 项目中的各个应用

存储系统

正常使用 VOD 系统还需要运行 oss 项目

其他

本项目模块太多, 构建部署都太过繁琐, 推荐使用 devops 项目来自动构建部署应用.