Browse Source

init

master
Caiqy 1 year ago
commit
e132d31698
  1. 21
      .editorconfig
  2. 27
      .gitignore
  3. 15
      Dockerfile
  4. 34
      LICENSE
  5. 3
      README.md
  6. 27
      doc/script/docker/elk/README.md
  7. 88
      doc/script/docker/elk/deploy.sh
  8. 115
      doc/script/docker/elk/docker-compose.yml
  9. 28
      doc/script/docker/elk/es-master.yml
  10. 28
      doc/script/docker/elk/es-slave1.yml
  11. 28
      doc/script/docker/elk/es-slave2.yml
  12. 37
      doc/script/docker/elk/filebeat.yml
  13. 8
      doc/script/docker/elk/kibana.yml
  14. 23
      doc/script/docker/elk/logstash-filebeat.conf
  15. 8
      doc/script/docker/elk/logstash.yml
  16. 16
      doc/script/docker/elk/undeploy.sh
  17. 1
      doc/script/fatjar/service.cmd
  18. 76
      doc/script/fatjar/service.sh
  19. BIN
      doc/script/nginx/371c96b60e6f39e8b0f24bce73240cc3.png
  20. 4
      doc/script/nginx/Dockerfile
  21. 6
      doc/script/nginx/docker-build-on-lan.sh
  22. 6
      doc/script/nginx/docker-build-on-wan.sh
  23. 2
      doc/script/nginx/h5/index.html
  24. 181
      doc/script/nginx/h5/static/css/customicons.css
  25. 204
      doc/script/nginx/h5/static/css/local-icon.css
  26. BIN
      doc/script/nginx/h5/static/customicons.ttf
  27. BIN
      doc/script/nginx/h5/static/fonts/uniicons.b6d3756e.ttf
  28. BIN
      doc/script/nginx/h5/static/img/bg/course-process.png
  29. BIN
      doc/script/nginx/h5/static/img/bg/leave.png
  30. BIN
      doc/script/nginx/h5/static/img/bg/qualified.png
  31. BIN
      doc/script/nginx/h5/static/img/bg/question-info-▒╕╖▌.png
  32. BIN
      doc/script/nginx/h5/static/img/bg/question-info.png
  33. BIN
      doc/script/nginx/h5/static/img/bg/rank-self.png
  34. BIN
      doc/script/nginx/h5/static/img/bg/remove-leave.png
  35. BIN
      doc/script/nginx/h5/static/img/bg/stime-bg.png
  36. BIN
      doc/script/nginx/h5/static/img/bg/train-bg.png
  37. BIN
      doc/script/nginx/h5/static/img/bg/ucenter-bg1-▒╕╖▌.png
  38. BIN
      doc/script/nginx/h5/static/img/bg/ucenter-bg1.png
  39. BIN
      doc/script/nginx/h5/static/img/bg/ucenter-▒╕╖▌.png
  40. BIN
      doc/script/nginx/h5/static/img/bg/ucenter.png
  41. BIN
      doc/script/nginx/h5/static/img/bg/unqualified.png
  42. BIN
      doc/script/nginx/h5/static/img/help.5fd2d328.png
  43. BIN
      doc/script/nginx/h5/static/img/icon/arrow-right.png
  44. BIN
      doc/script/nginx/h5/static/img/icon/cert.png
  45. BIN
      doc/script/nginx/h5/static/img/icon/clock.png
  46. BIN
      doc/script/nginx/h5/static/img/icon/close.png
  47. BIN
      doc/script/nginx/h5/static/img/icon/course-score.png
  48. BIN
      doc/script/nginx/h5/static/img/icon/course.png
  49. BIN
      doc/script/nginx/h5/static/img/icon/exam.png
  50. BIN
      doc/script/nginx/h5/static/img/icon/help.png
  51. BIN
      doc/script/nginx/h5/static/img/icon/hot-fire.png
  52. BIN
      doc/script/nginx/h5/static/img/icon/leave.png
  53. BIN
      doc/script/nginx/h5/static/img/icon/logo-icon.png
  54. BIN
      doc/script/nginx/h5/static/img/icon/map.png
  55. BIN
      doc/script/nginx/h5/static/img/icon/msg.png
  56. BIN
      doc/script/nginx/h5/static/img/icon/offline-train.png
  57. BIN
      doc/script/nginx/h5/static/img/icon/pdf.png
  58. BIN
      doc/script/nginx/h5/static/img/icon/question-info.png
  59. BIN
      doc/script/nginx/h5/static/img/icon/question-list.png
  60. BIN
      doc/script/nginx/h5/static/img/icon/rank-1.png
  61. BIN
      doc/script/nginx/h5/static/img/icon/rank-2.png
  62. BIN
      doc/script/nginx/h5/static/img/icon/rank-3.png
  63. BIN
      doc/script/nginx/h5/static/img/icon/rank.png
  64. BIN
      doc/script/nginx/h5/static/img/icon/sanjiao.png
  65. BIN
      doc/script/nginx/h5/static/img/icon/scan.png
  66. BIN
      doc/script/nginx/h5/static/img/icon/search.png
  67. BIN
      doc/script/nginx/h5/static/img/icon/selected.png
  68. BIN
      doc/script/nginx/h5/static/img/icon/study-time.png
  69. BIN
      doc/script/nginx/h5/static/img/icon/ucenter-msg.png
  70. BIN
      doc/script/nginx/h5/static/img/icon/umsg.png
  71. BIN
      doc/script/nginx/h5/static/img/icon/uset.png
  72. BIN
      doc/script/nginx/h5/static/img/icon/video-exam.png
  73. BIN
      doc/script/nginx/h5/static/img/icon/video-play.png
  74. BIN
      doc/script/nginx/h5/static/img/icon/view.png
  75. BIN
      doc/script/nginx/h5/static/img/icon/zan.png
  76. BIN
      doc/script/nginx/h5/static/img/icon/zand.png
  77. BIN
      doc/script/nginx/h5/static/img/leave.27a7e5e4.png
  78. BIN
      doc/script/nginx/h5/static/img/login-head.b27dc487.png
  79. BIN
      doc/script/nginx/h5/static/img/msg.79e2f4a2.png
  80. BIN
      doc/script/nginx/h5/static/img/page/excel.png
  81. BIN
      doc/script/nginx/h5/static/img/page/jpg.png
  82. BIN
      doc/script/nginx/h5/static/img/page/login-head.png
  83. BIN
      doc/script/nginx/h5/static/img/page/mp4.png
  84. BIN
      doc/script/nginx/h5/static/img/page/pdf.png
  85. BIN
      doc/script/nginx/h5/static/img/page/png.png
  86. BIN
      doc/script/nginx/h5/static/img/page/ppt.png
  87. BIN
      doc/script/nginx/h5/static/img/page/word.png
  88. BIN
      doc/script/nginx/h5/static/img/qualified.6be8064c.png
  89. BIN
      doc/script/nginx/h5/static/img/question-info.bbb944d7.png
  90. BIN
      doc/script/nginx/h5/static/img/rank-1.27eda518.png
  91. BIN
      doc/script/nginx/h5/static/img/rank-2.264a70da.png
  92. BIN
      doc/script/nginx/h5/static/img/rank-3.ee0ef036.png
  93. BIN
      doc/script/nginx/h5/static/img/rank-self.d2446496.png
  94. BIN
      doc/script/nginx/h5/static/img/scan.6ce71948.png
  95. BIN
      doc/script/nginx/h5/static/img/tabbar/course.png
  96. BIN
      doc/script/nginx/h5/static/img/tabbar/coursed.png
  97. BIN
      doc/script/nginx/h5/static/img/tabbar/home.png
  98. BIN
      doc/script/nginx/h5/static/img/tabbar/homed.png
  99. BIN
      doc/script/nginx/h5/static/img/tabbar/knowledge.png
  100. BIN
      doc/script/nginx/h5/static/img/tabbar/knowledged.png
  101. Some files were not shown because too many files have changed in this diff Show More

21
.editorconfig

@ -0,0 +1,21 @@
# http://editorconfig.org
root = true
# 空格替代Tab缩进在各种编辑工具下效果一致
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.java]
indent_style = tab
[*.{json,yml}]
indent_size = 2
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

27
.gitignore vendored

@ -0,0 +1,27 @@
# maven #
target
logs
# windows #
Thumbs.db
# Mac #
.DS_Store
# eclipse #
.settings
.project
.classpath
.log
*.class
# idea #
.idea
*.iml
# Package Files #
*.jar
*.war
*.ear
/target

15
Dockerfile

@ -0,0 +1,15 @@
FROM bladex/alpine-java:openjdk8-openj9_cn_slim
MAINTAINER smallchill@163.com
RUN mkdir -p /blade
WORKDIR /blade
EXPOSE 8088
ADD ./target/edu-training-api.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]

34
LICENSE

@ -0,0 +1,34 @@
BladeX商业授权许可协议
一、 知识产权:
BladeX系列产品知识产权归上海布雷德科技有限公司独立所有
二、 许可:
1. 在您完全接受并遵守本协议的基础上,本协议授予您使用BladeX的某些权利和非独占性许可。
2. 本协议中,将本产品使用用途分为“专业版用途”和“企业版用途”。
3. “专业版用途”定义:指个人在非团体机构中出于任何目的使用本产品(任何目的包括商业目的或非盈利目的)。
4. “企业版用途”定义:指团体机构(例如公司企业、政府、学校、军队、医院、社会团体等各类组织)(不包含集团,若集团使用则需为各个子公司分别购买企业授权)出于任何目的使用本产品(任何目的包括商业目的或非盈利目的)。
三、 约束和限制:
1. 本产品只能由您为本协议许可的目的而使用,您不得透露给任何第三方;
2. 从本产品取得的任何信息、软件、产品或服务,您不得对其进行修改、改编或基于以上内容创建同种类别的衍生产品并售卖。
3. 您不得对本产品以及与之关联的商业授权进行发布、出租、销售、分销、抵押、转让、许可或发放子许可证。
4. 本产品商业授权版可能包含一些独立功能或特性,这些功能只有在您购买商业授权后才可以使用。在未取得商业授权的情况下,您不得使用、尝试使用或复制这些授权版独立功能。
5. 若您的客户要求以源码方式交付软件,需缴纳企业版授权费用,否则本产品部分不得提供源码。
四、 不得用于非法或禁止的用途:
您在使用本产品或服务时,不得将本产品产品或服务用于任何非法用途或本协议条款、条件和声明禁止的用途。
五、 免责说明:
1. 本产品按“现状”授予许可,您须自行承担使用本产品的风险。BladeX团队不对此提供任何明示、暗示或任何其它形式的担保和表示。在任何情况下,对于因使用或无法使用本软件而导致的任何损失(包括但不仅限于商业利润损失、业务中断或业务信息丢失),BladeX团队无需向您或任何第三方负责,即使BladeX团队已被告知可能会造成此类损失。在任何情况下, BladeX团队均不就任何直接的、间接的、附带的、后果性的、特别的、惩戒性的和处罚性的损害赔偿承担任何责任,无论该主张是基于保证、合同、侵权(包括疏忽)或是基于其他原因作出。
2. 本产品可能内置有第三方服务,您应自行评估使用这些第三方服务的风险,由使用此类第三方服务而产生的纠纷,全部责任由您自行承担。
3. BladeX团队不对使用本产品构建的网站中任何信息内容以及导致的任何版权纠纷、法律争议和后果承担任何责任,全部责任由您自行承担。
4. BladeX团队可能会经常提供产品更新或升级,但BladeX团队没有为根据本协议许可的产品提供维护或更新的责任。
5. BladeX团队可能会按照官方制定的答疑规则为您进行答疑,但BladeX团队没有为根据本协议许可的产品提供技术支持的义务或责任。
六、 权利和所有权的保留:
BladeX团队保留所有未在本协议中明确授予您的所有权利。BladeX团队保留随时更新本协议的权利,并只需公示于对应产品项目的LICENSE文件,无需征得您的事先同意且无需另行通知,更新后的内容应于公示即时生效。您可以随时访问产品地址并查阅最新版许可条款,在更新生效后您继续使用本产品则被视作您已接受了新的条款。
七、 协议终止
1. 您一旦开始复制、下载、安装或者使用本产品,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的许可权力同时,也受到相关的约束和限制,本协议许可范围以外的行为,将直接违反本协议并构成侵权。
2. 一旦您违反本协议的条款,BladeX团队随时可能终止本协议、收回许可和授权,并要求您承担相应法律和经济责任。

3
README.md

@ -0,0 +1,3 @@
# edu-training-api
四川省应急教育培训网络平台 接口系统

27
doc/script/docker/elk/README.md

@ -0,0 +1,27 @@
## 一、调整内存:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144](elasticsearch用户拥有的内存权限太小,至少需要262144)
#### 1.修改配置sysctl.conf
[root@localhost ~]# vi /etc/sysctl.conf
#### 2.添加下面配置:
vm.max_map_count=262144
#### 3.重新加载:
[root@localhost ~]# sysctl -p
#### 4.最后重新启动elasticsearch,即可启动成功。
## 二、Docker 命令自动补全
#### 1.安装依赖工具bash-complete
[root@localhost ~]# yum install -y bash-completion
[root@localhost ~]# source /usr/share/bash-completion/completions/docker
[root@localhost ~]# source /usr/share/bash-completion/bash_completion
## 三、将本文件夹内的文件拷贝至服务器
#### 1.对sh脚本赋予执行权限
#### 2.执行 ./deploy.sh
#### 3.等待服务启动完毕即可
#### 4.卸载执行 ./undeploy.sh

88
doc/script/docker/elk/deploy.sh

@ -0,0 +1,88 @@
#./bin/bash
# 定义颜色
BLUE_COLOR="\033[36m"
RED_COLOR="\033[31m"
GREEN_COLOR="\033[32m"
VIOLET_COLOR="\033[35m"
RES="\033[0m"
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
echo -e "${BLUE_COLOR}# Docker ELK Deploy Script #${RES}"
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
# 创建目录
echo -e "${BLUE_COLOR}---> create [elasticsearch]directory start.${RES}"
if [ ! -d "./elasticsearch/" ]; then
mkdir -p ./elasticsearch/master/conf ./elasticsearch/master/data ./elasticsearch/master/logs \
./elasticsearch/slave1/conf ./elasticsearch/slave1/data ./elasticsearch/slave1/logs \
./elasticsearch/slave2/conf ./elasticsearch/slave2/data ./elasticsearch/slave2/logs
fi
echo -e "${RED_COLOR}---> create [kibana]directory start.${RES}"
if [ ! -d "./kibana/" ]; then
mkdir -p ./kibana/conf ./kibana/logs
fi
echo -e "${GREEN_COLOR}---> create [logstash]directory start.${RES}"
if [ ! -d "./logstash/" ]; then
mkdir -p ./logstash/conf ./logstash/logs
fi
echo -e "${GREEN_COLOR}---> create [filebeat]directory start.${RES}"
if [ ! -d "./filebeat/" ]; then
mkdir -p ./filebeat/conf ./filebeat/logs ./filebeat/data
fi
echo -e "${VIOLET_COLOR}---> create [nginx]directory start.${RES}"
if [ ! -d "./nginx/" ]; then
mkdir -p ./nginx/conf ./nginx/logs ./nginx/www
fi
echo -e "${BLUE_COLOR}===> create directory success.${RES}"
# 目录授权(data/logs 都要授读/写权限)
echo -e "${BLUE_COLOR}---> directory authorize start.${RES}"
if [ -d "./elasticsearch/" ]; then
chmod 777 ./elasticsearch/master/data/ ./elasticsearch/master/logs/ \
./elasticsearch/slave1/data/ ./elasticsearch/slave1/logs/ \
./elasticsearch/slave2/data/ ./elasticsearch/slave2/logs
fi
if [ -d "./filebeat/" ]; then
chmod 777 ./filebeat/data/ ./filebeat/logs/
fi
echo -e "${BLUE_COLOR}===> directory authorize success.${RES}"
# 移动配置文件
echo -e "${BLUE_COLOR}---> move [elasticsearch]config file start.${RES}"
if [ -f "./es-master.yml" ] && [ -f "./es-slave1.yml" ] && [ -f "./es-slave2.yml" ]; then
mv ./es-master.yml ./elasticsearch/master/conf
mv ./es-slave1.yml ./elasticsearch/slave1/conf
mv ./es-slave2.yml ./elasticsearch/slave2/conf
fi
echo -e "${RED_COLOR}---> move [kibana]config file start.${RES}"
if [ -f "./kibana.yml" ]; then
mv ./kibana.yml ./kibana/conf
fi
echo -e "${GREEN_COLOR}---> move [logstash]config file start.${RES}"
if [ -f "./logstash.yml" ] && [ -f "./logstash-filebeat.conf" ]; then
mv ./logstash-filebeat.conf ./logstash/conf
mv ./logstash.yml ./logstash/conf
fi
echo -e "${GREEN_COLOR}---> move [filebeat]config file start.${RES}"
if [ -f "./filebeat.yml" ]; then
mv ./filebeat.yml ./filebeat/conf
fi
echo -e "${VIOLET_COLOR}---> move [nginx]config file start.${RES}"
if [ -f "./nginx.conf" ]; then
mv ./nginx.conf ./nginx/conf
fi
echo -e "${BLUE_COLOR}===> move config files success.${RES}"
echo -e "${GREEN_COLOR}>>>>>>>>>>>>>>>>>> The End <<<<<<<<<<<<<<<<<<${RES}"
# 部署项目
echo -e "${BLUE_COLOR}==================> Docker deploy Start <==================${RES}"
docker-compose up --build -d

115
doc/script/docker/elk/docker-compose.yml

@ -0,0 +1,115 @@
version: "3"
services:
es-master:
container_name: es-master
hostname: es-master
image: elasticsearch:7.1.1
restart: always
ports:
- 9200:9200
- 9300:9300
volumes:
- ./elasticsearch/master/conf/es-master.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./elasticsearch/master/data:/usr/share/elasticsearch/data
- ./elasticsearch/master/logs:/usr/share/elasticsearch/logs
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
es-slave1:
container_name: es-slave1
image: elasticsearch:7.1.1
restart: always
ports:
- 9201:9200
- 9301:9300
volumes:
- ./elasticsearch/slave1/conf/es-slave1.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./elasticsearch/slave1/data:/usr/share/elasticsearch/data
- ./elasticsearch/slave1/logs:/usr/share/elasticsearch/logs
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
es-slave2:
container_name: es-slave2
image: elasticsearch:7.1.1
restart: always
ports:
- 9202:9200
- 9302:9300
volumes:
- ./elasticsearch/slave2/conf/es-slave2.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./elasticsearch/slave2/data:/usr/share/elasticsearch/data
- ./elasticsearch/slave2/logs:/usr/share/elasticsearch/logs
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
es-head:
container_name: es-head
image: mobz/elasticsearch-head:5
restart: always
ports:
- 9100:9100
depends_on:
- es-master
- es-slave1
- es-slave2
kibana:
container_name: kibana
hostname: kibana
image: kibana:7.1.1
restart: always
ports:
- 5601:5601
volumes:
- ./kibana/conf/kibana.yml:/usr/share/kibana/config/kibana.yml
environment:
- elasticsearch.hosts=http://es-master:9200
depends_on:
- es-master
- es-slave1
- es-slave2
filebeat:
# 容器名称
container_name: filebeat
# 主机名称
hostname: filebeat
# 镜像
image: docker.elastic.co/beats/filebeat:7.1.1
# 重启机制
restart: always
# 持久化挂载
volumes:
- ./filebeat/conf/filebeat.yml:/usr/share/filebeat/filebeat.yml
# 映射到容器中[作为数据源]
- ./logs:/home/project/elk/logs
- ./filebeat/logs:/usr/share/filebeat/logs
- ./filebeat/data:/usr/share/filebeat/data
# 将指定容器连接到当前连接,可以设置别名,避免ip方式导致的容器重启动态改变的无法连接情况
links:
- logstash
ports:
- 9000:9000
# 依赖服务[可无]
depends_on:
- es-master
- es-slave1
- es-slave2
logstash:
container_name: logstash
hostname: logstash
image: logstash:7.1.1
command: logstash -f ./conf/logstash-filebeat.conf
restart: always
volumes:
# 映射到容器中
- ./logstash/conf/logstash-filebeat.conf:/usr/share/logstash/conf/logstash-filebeat.conf
- ./logstash/conf/logstash.yml:/usr/share/logstash/config/logstash.yml
ports:
- 5044:5044
depends_on:
- es-master
- es-slave1
- es-slave2

28
doc/script/docker/elk/es-master.yml

@ -0,0 +1,28 @@
# 集群名称
cluster.name: es-cluster
# 节点名称
node.name: es-master
# 是否可以成为master节点
node.master: true
# 是否允许该节点存储数据,默认开启
node.data: false
# 网络绑定
network.host: 0.0.0.0
# 设置对外服务的http端口
http.port: 9200
# 设置节点间交互的tcp端口
transport.port: 9300
# 集群发现
discovery.seed_hosts:
- es-master
- es-slave1
- es-slave2
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
cluster.initial_master_nodes:
- es-master
# 支持跨域访问
http.cors.enabled: true
http.cors.allow-origin: "*"
# 安全认证
xpack.security.enabled: false
#http.cors.allow-headers: "Authorization"

28
doc/script/docker/elk/es-slave1.yml

@ -0,0 +1,28 @@
# 集群名称
cluster.name: es-cluster
# 节点名称
node.name: es-slave1
# 是否可以成为master节点
node.master: true
# 是否允许该节点存储数据,默认开启
node.data: true
# 网络绑定
network.host: 0.0.0.0
# 设置对外服务的http端口
http.port: 9201
# 设置节点间交互的tcp端口
#transport.port: 9301
# 集群发现
discovery.seed_hosts:
- es-master
- es-slave1
- es-slave2
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
cluster.initial_master_nodes:
- es-master
# 支持跨域访问
http.cors.enabled: true
http.cors.allow-origin: "*"
# 安全认证
xpack.security.enabled: false
#http.cors.allow-headers: "Authorization"

28
doc/script/docker/elk/es-slave2.yml

@ -0,0 +1,28 @@
# 集群名称
cluster.name: es-cluster
# 节点名称
node.name: es-slave2
# 是否可以成为master节点
node.master: true
# 是否允许该节点存储数据,默认开启
node.data: true
# 网络绑定
network.host: 0.0.0.0
# 设置对外服务的http端口
http.port: 9202
# 设置节点间交互的tcp端口
#transport.port: 9302
# 集群发现
discovery.seed_hosts:
- es-master
- es-slave1
- es-slave2
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
cluster.initial_master_nodes:
- es-master
# 支持跨域访问
http.cors.enabled: true
http.cors.allow-origin: "*"
# 安全认证
xpack.security.enabled: false
#http.cors.allow-headers: "Authorization"

37
doc/script/docker/elk/filebeat.yml

@ -0,0 +1,37 @@
filebeat.inputs:
- type: log
enabled: true
paths:
# 当前目录下的所有.log文件
- /home/project/elk/logs/*.log
multiline.pattern: ^\[
multiline.negate: true
multiline.match: after
- type: tcp
enabled: true
max_message_size: 10MiB
host: "0.0.0.0:9000"
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.dashboards.enabled: false
setup.kibana:
host: "http://kibana:5601"
# 不直接传输至ES
#output.elasticsearch:
# hosts: ["http://es-master:9200"]
# index: "filebeat-%{[beat.version]}-%{+yyyy.MM.dd}"
output.logstash:
hosts: ["logstash:5044"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~

8
doc/script/docker/elk/kibana.yml

@ -0,0 +1,8 @@
# 服务端口
server.port: 5601
# 服务IP
server.host: "0.0.0.0"
# ES
elasticsearch.hosts: ["http://es-master:9200"]
# 汉化
i18n.locale: "zh-CN"

23
doc/script/docker/elk/logstash-filebeat.conf

@ -0,0 +1,23 @@
input {
# 来源beats
beats {
# 端口
port => "5044"
}
}
# 分析、过滤插件,可以多个
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
geoip {
source => "clientip"
}
}
output {
# 选择elasticsearch
elasticsearch {
hosts => ["http://es-master:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
}
}

8
doc/script/docker/elk/logstash.yml

@ -0,0 +1,8 @@
# 服务IP
http.host: "0.0.0.0"
# ES
xpack.monitoring.elasticsearch.hosts: [ "http://es-master:9200" ]
xpack.monitoring.enabled: true
xpack.management.enabled: false

16
doc/script/docker/elk/undeploy.sh

@ -0,0 +1,16 @@
#./bin/bash
# 定义颜色
BLUE_COLOR="\033[36m"
RED_COLOR="\033[31m"
GREEN_COLOR="\033[32m"
VIOLET_COLOR="\033[35m"
RES="\033[0m"
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
echo -e "${BLUE_COLOR}# Docker ELK UnDeploy Script #${RES}"
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
# 部署项目
echo -e "${BLUE_COLOR}==================> Docker UnDeploy Start <==================${RES}"
docker-compose stop
docker-compose rm

1
doc/script/fatjar/service.cmd

@ -0,0 +1 @@
java -Xms1024m -Xmx1024m -jar app.jar

76
doc/script/fatjar/service.sh

@ -0,0 +1,76 @@
#!/bin/bash
#设置jar文件名
APP_NAME=app.jar
#使用说明,用来提示输入参数
usage() {
echo "Usage: sh 执行脚本.sh [start|stop|restart|status]"
exit 1
}
#检查程序是否在运行
is_exist(){
pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' `
#如果不存在返回1,存在返回0
if [ -z "${pid}" ]; then
return 1
else
return 0
fi
}
#启动方法
start(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is already running. pid=${pid} ."
else
nohup java -Xms1024m -Xmx1024m -jar $APP_NAME > /dev/null 2>&1 &
fi
}
#停止方法
stop(){
is_exist
if [ $? -eq "0" ]; then
kill -9 $pid
else
echo "${APP_NAME} is not running"
fi
}
#输出运行状态
status(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is running. Pid is ${pid}"
else
echo "${APP_NAME} is NOT running."
fi
}
#重启
restart(){
stop
start
}
#根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in
"start")
start
;;
"stop")
stop
;;
"status")
status
;;
"restart")
restart
;;
*)
usage
;;
esac

BIN
doc/script/nginx/371c96b60e6f39e8b0f24bce73240cc3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

4
doc/script/nginx/Dockerfile

@ -0,0 +1,4 @@
FROM nginx:stable-alpine
ENV LANG en_US.UTF-8
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

6
doc/script/nginx/docker-build-on-lan.sh

@ -0,0 +1,6 @@
#!/usr/bin/env bash
docker build -t edu-training-nginx:3.0.0.RELEASE . \
&& cd ../../../ \
&& docker-compose stop nginx-on-lan \
&& docker-compose rm -f nginx-on-lan \
&& docker-compose up -d nginx-on-lan

6
doc/script/nginx/docker-build-on-wan.sh

@ -0,0 +1,6 @@
#!/usr/bin/env bash
docker build -t edu-training-nginx:3.0.0.RELEASE . \
&& cd ../../../ \
&& docker-compose stop nginx-on-wan \
&& docker-compose rm -f nginx-on-wan \
&& docker-compose up -d nginx-on-wan

2
doc/script/nginx/h5/index.html

@ -0,0 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>uniapp</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.16ff1c34.js></script><script src=/static/js/index.b9f38b2b.js></script></body></html>

181
doc/script/nginx/h5/static/css/customicons.css

@ -0,0 +1,181 @@
@font-face {
font-family: Source Han Sans CN;
/* font-family: "customicons"; */
/* Project id 2878519 */
src: url('/static/customicons.ttf') format('truetype');
}
>>>html, .uni-body {
font-size: calc(100vw / 750) !important;
}
page {
font-size: 12px;
}
uni-page-body {
height: 100%;
}
>>> * {
pardding: 0;
margin: 0;
box-sizing: border-box;
}
.page-box {
margin-top: 50rpx;
padding: 0 30rpx;
height: 100%;
}
>>> img, a img {
display: inline-block;
}
>>> uni-image,image {
width: 100%;
height: 100%;
}
>>> .uni-icons.uniui-eye {
color: #A2A2A2 !important;
}
.customicons {
font-family: "customicons" !important;
}
.youxi:before {
content: "\e60e";
}
.wenjian:before {
content: "\e60f";
}
.zhuanfa:before {
content: "\e610";
}
.rflex {
display: flex;
justify-content: center;
align-items: center;
}
.cflex {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.jcc {
justify-content: center;
}
.jcsb {
justify-content: space-between;
}
.jcsa {
justify-content: space-around;
}
.jcfs {
justify-content: flex-start;
}
.jcfe {
justify-content: flex-end;
}
.aic {
align-items: center;
}
.aifs {
align-items: flex-start;
}
.aife {
align-items: flex-end;
}
.asfs {
align-self: flex-start;
}
.asc {
align-self: center;
}
.asfe {
align-self: flex-end;
}
.item-view-info {
color: #A2A2A2;
}
.p30 {
padding: 30rpx;
}
.w100 {
width: 100%;
}
.w50 {
width: 50%;
}
.p25 {
padding: 25rpx;
}
.mt20 {
margin-top: 20rpx;
}
.mt25 {
margin-top: 25rpx;
}
.mt30 {
margin-top: 30rpx;
}
.mb20 {
margin-bottom: 20rpx;
}
.mb25 {
margin-bottom: 25rpx;
}
.mb30 {
margin-bottom: 30rpx;
}
.ml25 {
margin-left: 25rpx;
}
.mr25 {
margin-right: 25rpx;
}
.h100 {
height: 100%;
}
.bgw {
background-color: #fff;
}
.border {
border: 1rpx solid #EEEEEE;
}

204
doc/script/nginx/h5/static/css/local-icon.css

@ -0,0 +1,204 @@
.icon {
display: block;
object-fit: cover;
width: 66rpx;
height: 66rpx;
background-size: 100% 100%;
}
.icon-close {
width: 24rpx;
height: 24rpx;
background-image: url('@/static/img/icon/close.png');
}
.icon-msg {
background-image: url('@/static/img/icon/msg.png');
}
.icon-scan {
background-image: url('@/static/img/icon/scan.png');
}
.icon-search {
width: 30rpx;
height: 30rpx;
background-image: url('@/static/img/icon/search.png');
}
.icon-stime {
width: 20rpx;
height: 20rpx;
background-image: url('@/static/img/icon/study-time.png');
}
.icon-stime-26 {
width: 26rpx;
height: 26rpx;
background-image: url('@/static/img/icon/study-time.png');
}
.icon-xsj {
width: 18rpx;
height: 18rpx;
background-image: url('@/static/img/icon/sanjiao.png');
}
.icon-fire {
width: 32rpx;
height: 42rpx;
background-image: url('@/static/img/icon/hot-fire.png');
}
.icon-umsg {
width: 57rpx;
height: 57rpx;
background-image: url('@/static/img/icon/umsg.png');
border-radius: 50%;
background-color: #FFEFED;
}
.icon-selected {
width: 30rpx;
height: 30rpx;
background-image: url('@/static/img/icon/selected.png');
}
.icon-exam {
width: 41rpx;
height: 45rpx;
background-image: url('@/static/img/icon/video-exam.png');
}
.icon-video {
width: 42rpx;
height: 42rpx;
background-image: url('@/static/img/icon/video-play.png');
}
.icon-course-score {
width: 42rpx;
height: 42rpx;
background-image: url('@/static/img/icon/course-score.png');
}
.icon-pdf {
width: 64rpx;
height: 66rpx;
background-image: url('@/static/img/icon/pdf.png');
}
.icon-zan {
width: 30rpx;
height: 30rpx;
background-image: url('@/static/img/icon/zan.png');
}
.icon-zand {
width: 30rpx;
height: 30rpx;
background-image: url('@/static/img/icon/zand.png');
}
.icon-q-error {
width: 46rpx;
height: 46rpx;
background-image: url('@/static/img/icon/question-info.png');
}
.icon-question-list {
width: 46rpx;
height: 46rpx;
background-image: url('@/static/img/icon/question-list.png');
}
.icon-clock {
width: 20rpx;
height: 20rpx;
background-image: url('@/static/img/icon/clock.png');
}
.icon-logo {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/logo-icon.png');
}
.icon-course {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/course.png');
}
.icon-uexam {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/exam.png');
}
.icon-cert {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/cert.png');
}
.icon-rank {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/rank.png');
}
.icon-offline-train {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/offline-train.png');
}
.icon-leave {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/leave.png');
}
.icon-notice {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/ucenter-msg.png');
}
.icon-uset {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/uset.png');
}
.icon-map {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/map.png');
}
.icon-help {
width: 52rpx;
height: 52rpx;
background-image: url('@/static/img/icon/help.png');
}
.icon-rank1 {
width: 45rpx;
height: 65rpx;
background-image: url('@/static/img/icon/rank-1.png');
}
.icon-rank2 {
width: 45rpx;
height: 65rpx;
background-image: url('@/static/img/icon/rank-2.png');
}
.icon-rank3 {
width: 45rpx;
height: 65rpx;
background-image: url('@/static/img/icon/rank-3.png');
}

BIN
doc/script/nginx/h5/static/customicons.ttf

Binary file not shown.

BIN
doc/script/nginx/h5/static/fonts/uniicons.b6d3756e.ttf

Binary file not shown.

BIN
doc/script/nginx/h5/static/img/bg/course-process.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
doc/script/nginx/h5/static/img/bg/leave.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
doc/script/nginx/h5/static/img/bg/qualified.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
doc/script/nginx/h5/static/img/bg/question-info-▒╕╖▌.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
doc/script/nginx/h5/static/img/bg/question-info.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

BIN
doc/script/nginx/h5/static/img/bg/rank-self.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
doc/script/nginx/h5/static/img/bg/remove-leave.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
doc/script/nginx/h5/static/img/bg/stime-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
doc/script/nginx/h5/static/img/bg/train-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

BIN
doc/script/nginx/h5/static/img/bg/ucenter-bg1-▒╕╖▌.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 KiB

BIN
doc/script/nginx/h5/static/img/bg/ucenter-bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

BIN
doc/script/nginx/h5/static/img/bg/ucenter-▒╕╖▌.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
doc/script/nginx/h5/static/img/bg/ucenter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
doc/script/nginx/h5/static/img/bg/unqualified.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
doc/script/nginx/h5/static/img/help.5fd2d328.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/arrow-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/cert.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
doc/script/nginx/h5/static/img/icon/clock.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
doc/script/nginx/h5/static/img/icon/close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
doc/script/nginx/h5/static/img/icon/course-score.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/course.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
doc/script/nginx/h5/static/img/icon/exam.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
doc/script/nginx/h5/static/img/icon/help.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/hot-fire.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
doc/script/nginx/h5/static/img/icon/leave.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
doc/script/nginx/h5/static/img/icon/logo-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
doc/script/nginx/h5/static/img/icon/map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
doc/script/nginx/h5/static/img/icon/msg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
doc/script/nginx/h5/static/img/icon/offline-train.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
doc/script/nginx/h5/static/img/icon/pdf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
doc/script/nginx/h5/static/img/icon/question-info.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
doc/script/nginx/h5/static/img/icon/question-list.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/rank-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
doc/script/nginx/h5/static/img/icon/rank-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/script/nginx/h5/static/img/icon/rank-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/script/nginx/h5/static/img/icon/rank.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/sanjiao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

BIN
doc/script/nginx/h5/static/img/icon/scan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
doc/script/nginx/h5/static/img/icon/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
doc/script/nginx/h5/static/img/icon/study-time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
doc/script/nginx/h5/static/img/icon/ucenter-msg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
doc/script/nginx/h5/static/img/icon/umsg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
doc/script/nginx/h5/static/img/icon/uset.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
doc/script/nginx/h5/static/img/icon/video-exam.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
doc/script/nginx/h5/static/img/icon/video-play.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
doc/script/nginx/h5/static/img/icon/view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
doc/script/nginx/h5/static/img/icon/zan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
doc/script/nginx/h5/static/img/icon/zand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
doc/script/nginx/h5/static/img/leave.27a7e5e4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
doc/script/nginx/h5/static/img/login-head.b27dc487.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
doc/script/nginx/h5/static/img/msg.79e2f4a2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
doc/script/nginx/h5/static/img/page/excel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
doc/script/nginx/h5/static/img/page/jpg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
doc/script/nginx/h5/static/img/page/login-head.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
doc/script/nginx/h5/static/img/page/mp4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
doc/script/nginx/h5/static/img/page/pdf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
doc/script/nginx/h5/static/img/page/png.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
doc/script/nginx/h5/static/img/page/ppt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
doc/script/nginx/h5/static/img/page/word.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
doc/script/nginx/h5/static/img/qualified.6be8064c.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
doc/script/nginx/h5/static/img/question-info.bbb944d7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

BIN
doc/script/nginx/h5/static/img/rank-1.27eda518.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
doc/script/nginx/h5/static/img/rank-2.264a70da.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/script/nginx/h5/static/img/rank-3.ee0ef036.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/script/nginx/h5/static/img/rank-self.d2446496.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
doc/script/nginx/h5/static/img/scan.6ce71948.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/course.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/coursed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/homed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/knowledge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
doc/script/nginx/h5/static/img/tabbar/knowledged.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save