docker镜像打包脚本维护:docker compose

business
Mahone 9 months ago
parent babd6f5eb9
commit 13c9b5583a

@ -1,29 +1,7 @@
FROM nginx FROM nginx:1.24.0
MAINTAINER hnliuwx@gmail.com MAINTAINER hnliuwx@gmail.com
VOLUME /tmp
ENV LANG en_US.UTF-8
RUN echo "server { \
listen 80; \
location ^~ /ky { \
proxy_pass http://124.71.194.56:8080/ky/; \
proxy_set_header Host localhost; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
} \
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
location / { \
root /var/www/html/; \
index index.html index.htm; \
if (!-e \$request_filename) { \
rewrite ^(.*)\$ /index.html?s=\$1 last; \
break; \
} \
} \
access_log /var/log/nginx/access.log ; \
} " > /etc/nginx/conf.d/default.conf \
&& mkdir -p /var/www \
&& mkdir -p /var/www/html
ADD dist/ /var/www/html/ RUN rm -f /etc/nginx/conf.d/default.conf
ADD ./dist/ /usr/share/nginx/kykms-root/
EXPOSE 80 EXPOSE 80
EXPOSE 443

@ -1,5 +1,5 @@
let Global_Config = { let Global_Config = {
API_BASE_URL: '', API_BASE_URL: '/api',
SITE_TITLE: '科亿知识库', SITE_TITLE: '科亿知识库',
KYKMS_URL: 'http://113.125.46.255:8081', KYKMS_URL: 'http://113.125.46.255:8081',
COPYRIGHT: '科亿信息技术' COPYRIGHT: '科亿信息技术'

@ -1,43 +0,0 @@
version: '2'
services:
kymks-mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
restart: always
container_name: kykms-mysql
volumes:
- /home/docker/data/mysql:/var/lib/mysql
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
ports:
- 3306:3306
kymks-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
container_name: kykms-redis
kymks-ES:
image: elasticsearch:7.6.1
restart: always
hostname: kykms-ES
container_name: kykms-ES
volumes:
- /elasticsearch/data:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
cpuset-cpus: 1
m: 2G

@ -1,41 +0,0 @@
注意因为脚本部署的方式不稳定所以不再支持建议使用这个教程http://docs.kykms.cn/docs/mindoc/mindoc-1eqploikpjlkc
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup;
#wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo;
#wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo;
#yum install unzip -y;
#wget https://qntest.sihualuo.cn/KM_community.zip
#unzip KM_community.zip;
#
#systemctl stop firewalld;
#systemctl disable firewalld;
#yum clean all;
#yum make cache;
#yum install docker -y;
#yum install docker-compose -y;
#systemctl start docker;
#systemctl enable docker;
#mkdir /elasticsearch;
#mkdir /elasticsearch/data;
#chmod 777 /elasticsearch/data;
#chmod +x *.sh;
#
#docker load -i kykms-mysql.tar;
#docker load -i kykms-redis.tar;
#docker load -i kykms-ES.tar;
#docker-compose -f docker-compose-local.yml up -d;
#
#yum install nginx -y;
#mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak;
#cp ./nginx.conf /etc/nginx/;
#cp ./dist.zip /usr/share/nginx/html/;
#cp ./simsun.ttc /usr/share/fonts/;
#cd /usr/share/nginx/html;
#unzip -o dist.zip;
#systemctl enable nginx;
#systemctl start nginx;
#
#yum install java-1.8.0 -y;
#yum install libreoffice.x86_64 -y;
#cd -;
#chmod +x *.sh;
#./start.sh;

File diff suppressed because it is too large Load Diff

@ -1,78 +0,0 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
text/javascript application/javascript application/x-javascript
text/x-json application/json application/x-web-app-manifest+json
text/css text/plain text/x-component
font/opentype application/x-font-ttf application/vnd.ms-fontobject
image/x-icon;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server {
listen 3000;
#server添加下面内容 解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题
location / {
root /usr/share/nginx/html;
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}
}
location /api/{
if ($request_method = 'OPTIONS') { #处理预检请求
add_header 'Access-Control-Allow-Origin' '*'; #此处理客户端预检请求->nginx服务器跨域问题
add_header 'Access-Control-Allow-Headers' '*'; #此允许客户端请求携带header自定义参数也可以指定具体参数名称
return 204;
}
if ($request_method != 'OPTIONS') { #正常请求
#add_header 'Access-Control-Allow-Origin' '*'; #此处根据服务端api是否配置跨域决定是否配置不能重复配置
}
proxy_pass http://localhost:8080/ky/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}

@ -1,9 +0,0 @@
FROM mysql:5.7
MAINTAINER hnliuwx@gmail.com
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./km_mysql_docker.sql /docker-entrypoint-initdb.d

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,5 +0,0 @@
FROM elasticsearch:7.6.1
MAINTAINER hnliuwx@gmail.com
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install -b https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.6.1/elasticsearch-analysis-ik-7.6.1.zip

Binary file not shown.

@ -1,4 +0,0 @@
FROM redis:6.0
MAINTAINER hnliuwx@gmail.com

File diff suppressed because it is too large Load Diff

@ -1,96 +0,0 @@
# 先创建讯网络:
# docker network create --driver=bridge kykms_network
version: '3'
services:
kykms-mysql:
build:
context: ./DB
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
restart: always
container_name: kykms-mysql
image: mysql:comm
volumes:
- ./docker/mysql/data:/var/lib/mysql
- ./docker/mysql/log:/var/log/mysql
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
ports:
- 3306:3306
networks:
kykms_network:
kykms-redis:
image: redis:comm
build:
context: ./redis
ports:
- 6379:6379
restart: always
container_name: kykms-redis
networks:
kykms_network:
kykms-ES:
image: elasticsearch:comm
build:
context: ./ES
restart: always
container_name: kykms-ES
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TZ: Asia/Shanghai
ports:
- 9200:9200
- 9300:9300
networks:
kykms_network:
kykms:
build:
context: ./jeecg-boot-module-system
image: kykms:comm
container_name: kykms
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
depends_on:
- kykms-mysql
- kykms-redis
- kykms-ES
ports:
- "8080:8080"
networks:
kykms_network:
restart: always
command: java -jar ./jeecg-boot-module-system-2.4.5.jar 2>&1 &
kykms-nginx:
build:
context: ../ant-design-vue-jeecg
image: kykms-nginx:comm
depends_on:
- kykms
container_name: kykms-nginx
privileged: true
ports:
- "80:80"
volumes:
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
- ./docker/nginx/log:/var/log/nginx
networks:
kykms_network:
restart: always
networks:
kykms_network:
external: true

@ -1,60 +0,0 @@
version: '2'
services:
kykms-mysql:
build:
context: ./db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
restart: always
container_name: kykms-mysql
image: mysql:5.7
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
# --default-authentication-plugin=caching_sha2_password
ports:
- 3306:3306
kykms-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
hostname: kykms-redis
container_name: kykms-redis
kykms-ES:
build:
context: ./ES
image: elasticsearch:7.6.1
restart: always
hostname: kykms-ES
container_name: kykms-ES
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
cpuset-cpus: 1
m: 2G
kykms:
build:
context: ./jeecg-boot-module-system
restart: on-failure
privileged: true
depends_on:
- kykms-mysql
- kykms-redis
- kykms-ES
container_name: kykms
image: kykms
hostname: kykms
ports:
- 8080:8080

@ -1,19 +0,0 @@
#!/bin/bash
# shellcheck disable=SC2046
BASE_PATH=$(cd `dirname $0`;pwd)
echo "当前系统版本:";sudo cat /etc/redhat-release;
echo -e "\033[46;37;5m -------------- 开始安装docker所需环境 -------------- \033[0m";
# 安装docker环境
echo " ------------ 开始安装docker服务 ------------ ";
yum update -y;
yum install -y yum-utils device-mapper-persistent-data lvm2;
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo;
yum install -y docker-ce;
systemctl start docker;
systemctl enable docker;
docker version;
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose;
sudo chmod +x /usr/local/bin/docker-compose;
docker-compose version;
echo " ------------ docker服务安装完毕 ------------ ";
sudo ./kms-init.sh

@ -1,85 +0,0 @@
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 0.0.0.0
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
xpack.security.enabled: false
discovery.type: single-node
indices.query.bool.max_clause_count: 102400

@ -1,77 +0,0 @@
## JVM configuration
################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms1g
-Xmx2g
################################################################
## Expert settings
################################################################
##
## All settings below this section are considered
## expert settings. Don't tamper with them unless
## you understand what you are doing
##
################################################################
## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
## G1GC Configuration
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC
14-:-XX:G1ReservePercent=25
14-:-XX:InitiatingHeapOccupancyPercent=30
## JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR}
## heap dumps
# generate a heap dump when an allocation from the Java heap fails
# heap dumps are created in the working directory of the JVM
-XX:+HeapDumpOnOutOfMemoryError
# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
-XX:HeapDumpPath=data
# specify an alternative path for JVM fatal error logs
-XX:ErrorFile=logs/hs_err_pid%p.log
## JDK 8 GC logging
8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:logs/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m
# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m

@ -1,38 +0,0 @@
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

@ -1,49 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name _;
client_max_body_size 2000M;
# gzip config
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
# root /usr/share/nginx/;
# Load configuration files for the default server block.
location / {
root /usr/share/nginx/kykms-root;
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}
}
location /api/{
proxy_pass http://kykms:8080/ky/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 请求服务器升级协议为 WebSocket
#proxy_http_version 1.1;
#proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $connection_upgrade;
}
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

File diff suppressed because it is too large Load Diff

@ -86,8 +86,8 @@ import java.util.concurrent.TimeUnit;
@Slf4j @Slf4j
public class KmDocServiceImpl extends ServiceImpl<KmDocMapper, KmDoc> implements IKmDocService { public class KmDocServiceImpl extends ServiceImpl<KmDocMapper, KmDoc> implements IKmDocService {
@Value("${files.docservice.url.site-ip}") // @Value("${files.docservice.url.site-ip}")
private String docserviceSiteIp; // private String docserviceSiteIp;
@Resource @Resource
private KmDocMapper kmDocMapper; private KmDocMapper kmDocMapper;
@Autowired @Autowired
@ -1619,23 +1619,23 @@ public class KmDocServiceImpl extends ServiceImpl<KmDocMapper, KmDoc> implements
//for onlyoffice editor //for onlyoffice editor
public void downloadDocOF(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException { // public void downloadDocOF(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException {
KmDoc kmDoc = super.getById(docId); // KmDoc kmDoc = super.getById(docId);
if(kmDoc == null) { // if(kmDoc == null) {
response.sendError(HttpStatus.NOT_FOUND.value(),"无效的文档"); // response.sendError(HttpStatus.NOT_FOUND.value(),"无效的文档");
return; // return;
} // }
log.info("docserviceSiteIp:" + docserviceSiteIp); // log.info("docserviceSiteIp:" + docserviceSiteIp);
log.info("req.getRemoteAddr():" + req.getRemoteAddr()); // log.info("req.getRemoteAddr():" + req.getRemoteAddr());
boolean onlyOfficeDownloadFlag = req.getRemoteAddr().equals(docserviceSiteIp); // boolean onlyOfficeDownloadFlag = req.getRemoteAddr().equals(docserviceSiteIp);
//24小时下载次数限制via redis对院内用户不限制 // //24小时下载次数限制via redis对院内用户不限制
if(onlyOfficeDownloadFlag ){ // if(onlyOfficeDownloadFlag ){
getKmDoc(kmDoc, req,response, "Edit"); // getKmDoc(kmDoc, req,response, "Edit");
} // }
else{ // else{
response.sendError(HttpStatus.FORBIDDEN.value(),"下载限制"); // response.sendError(HttpStatus.FORBIDDEN.value(),"下载限制");
} // }
} // }
//下载文件 //下载文件
@SuppressWarnings("ALL") @SuppressWarnings("ALL")
public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException { public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException {

@ -1,24 +1,12 @@
FROM ansible/centos7-ansible FROM ubuntu:22.04
MAINTAINER mahone<liuwenxiong@mail.kykms.cn>
ENV container docker RUN apt update;apt install -y libreoffice;\
mkdir /kykms;
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \ COPY ./simsun.ttc /usr/share/fonts
cd /etc/yum.repos.d;\ COPY ./target/jeecg-boot-module-system-2.4.5.jar /kykms/
curl -o /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo;\
curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo;\
curl -o /etc/yum.repos.d/CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo;\
yum clean all;\
yum makecache;\
yum install libreoffice.x86_64 -y; \
mkdir /kykms; \
WORKDIR /kykms WORKDIR /kykms
ADD ./target/jeecg-boot-module-system-2.4.5.jar ./
ADD ./simsun.ttc /usr/share/fonts
CMD /usr/sbin/init;\
sleep 5;\
java -Djava.security.egd=file:/dev/./urandom -jar jeecg-boot-module-system-2.4.5.jar
EXPOSE 8080 EXPOSE 8080

@ -50,26 +50,39 @@
<build> <build>
<plugins> <plugins>
<!-- jar包一体化打包请放行此配置-->
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<layout>ZIP</layout> <!--微服务模式下修改为true,跳过此打包插件,否则微服务模块无法引用-->
<includes> <skip>false</skip>
<include>
<groupId>nothing</groupId>
<artifactId>nothing</artifactId>
</include>
</includes>
</configuration> </configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
<!-- jar包与lib包分离请放行此配置-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <layout>ZIP</layout>-->
<!-- <includes>-->
<!-- <include>-->
<!-- <groupId>nothing</groupId>-->
<!-- <artifactId>nothing</artifactId>-->
<!-- </include>-->
<!-- </includes>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>repackage</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
</plugins> </plugins>
</build> </build>
<!-- <build>--> <!-- <build>-->

@ -1,6 +1,5 @@
package org.jeecg.modules.system.controller; package org.jeecg.modules.system.controller;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.exceptions.ClientException; import com.aliyuncs.exceptions.ClientException;
@ -13,35 +12,25 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CacheConstant; import org.jeecg.common.constant.CacheConstant;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.modules.KM.common.config.BaseConfig;
import org.jeecg.modules.KM.common.rules.KMConstant;
import org.jeecg.modules.KM.common.utils.StringUtils;
import org.jeecg.modules.KM.service.IKmDocVisitRecordService;
import org.jeecg.modules.KM.service.IKmSysConfigService;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.*; import org.jeecg.common.util.*;
import org.jeecg.common.util.encryption.EncryptedString; import org.jeecg.common.util.encryption.EncryptedString;
import org.jeecg.modules.KM.common.config.BaseConfig;
import org.jeecg.modules.KM.service.IKmSysConfigService;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysRole;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.model.SysLoginModel; import org.jeecg.modules.system.model.SysLoginModel;
import org.jeecg.modules.system.model.SysThirdLoginModel;
import org.jeecg.modules.system.service.*; import org.jeecg.modules.system.service.*;
import org.jeecg.modules.system.util.RandImageUtil; import org.jeecg.modules.system.util.RandImageUtil;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.*; import java.util.*;
/** /**

@ -1,9 +1,9 @@
base: base:
upload-dir: /kykms/KmDocs upload-dir: /kykms/KmDocs
db-backup-dir: c:\KmDocs db-backup-dir: /kykms/dbBackup
soffice-path: /usr/bin/soffice soffice-path: /usr/bin/soffice
esclient: esclient:
master-host: kykms-ES master-host: kykms-ES-comm
master-port: 9200 master-port: 9200
master-auth: false master-auth: false
spring: spring:
@ -15,13 +15,13 @@ spring:
dynamic: dynamic:
datasource: datasource:
master: master:
url: jdbc:mysql://kykms-mysql:3306/km?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://kykms-mysql-comm:3306/km?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root username: root
password: root password: root
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
redis: redis:
database: 0 database: 3
host: kykms-redis host: kykms-redis-comm
lettuce: lettuce:
pool: pool:
max-active: 8 max-active: 8
@ -29,7 +29,7 @@ spring:
max-wait: -1ms max-wait: -1ms
min-idle: 0 min-idle: 0
shutdown-timeout: 100ms shutdown-timeout: 100ms
password: '' password: 123456
port: 6379 port: 6379
jeecg: jeecg:
uploadType: local uploadType: local

@ -2,7 +2,7 @@ spring:
application: application:
name: jeecg-system name: jeecg-system
profiles: profiles:
active: test active: docker
# active: @profile.name@ # active: @profile.name@
datasource: datasource:
druid: druid:

@ -1,2 +0,0 @@
chmod 777 -R ./docker/elasticsearch
docker network create --driver=bridge kykms_network
Loading…
Cancel
Save