完善docker运行与部署,已经可以一键运行

main^2
Mahone 11 months ago
parent e2663efe30
commit e4a23f00fe

@ -1,80 +1,30 @@
**官方镜像支持本机运行
**如需在服务器运行则需要自行构建前端镜像或运行前端服务并修改配置文件将服务端ip指向服务器真实ip
**Docker环境请自行准备
- # 用官方镜像运行
```
windows下运行CMD进入jeecg-boot根路径下面命令启动镜像容器组
docker-compose -f ./docker-compose-official.yml up
docker-compose up -d
```
访问 http://localhost:3000
访问 http://localhost
- # 本地打包构建后台
1. yml配置文件请确保每一项下面按正确配置
```
server:
port: 8080
servlet:
context-path: /ky
base:
#上传文件保存的路径
upload-dir: /kykms/KmDocs
# libreOffice安装路径
soffice-path: /usr/bin/soffice
esclient:
master-host: kykms-ES
master-port: 9200
spring:
datasource:
dynamic:
datasource:
# 数据库登录信息配置
master:
url: jdbc:mysql://kykms-mysql:3306/km?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
#redis 配置
redis:
database: 0
host: kykms-redis
password: ''
port: 6379
```
2. 通过jeecg-boot-parent项目 maven打包执行install
3. 打包Docker容器
```
运行CMD进入jeecg-boot根路径下面命令启动镜像容器组
docker-compose up -d
```
4. 访问后台项目注意要开启swaggerhttp://localhost:8080/ky/doc.html
- # 本地打包构建前端
1. 修改前端项目的后台域名
.env.production
1. 通过jeecg-boot-parent项目 maven打包执行install
2. 本地打包构建前端
修改前端项目的后台域名
.env.docker
```
VUE_APP_API_BASE_URL=http://localhost:8080/ky
VUE_APP_API_BASE_URL=/api
```
3. 在npm菜单下面选择 build:docker
4. 打包Docker容器
2. 进入ant-design-vue-jeecg根目录
运行CMD进入jeecg-boot根路径下面命令启动镜像容器组
```
yarn run build
```
3. 构建镜像(注意后面的".“)
```
docker build -t nginx:kykms .
```
4. 启动镜像
```
docker run --name kykms-nginx -p 3000:3000 -d nginx:kykms
docker-compose -f docker-compose-build.yml up -d
```
5. 访问前台项目 http://localhost:3000
5. 访问 http://localhost

@ -32,7 +32,7 @@
- 专业在线演示 [专业版](http://test.kykms.cn) 账号admin/123456
- 绿色单机版 [试用下载](http://service.kykms.cn/download-index) - [更多介绍](http://docs.kykms.cn/docs/greenDesktop/greenDesktop-1et33iuds3f68)
- 开发环境准备与运行,请参考:[开发环境准备与运行](./开发环境准备与运行.MD)
- 本地部署试用:提供多版本安装包直接下载 - [下载入口](http://service.kykms.cn/download-index)
- 本地部署试用:强烈建议[docker方式部署](http://docs.kykms.cn/docs/mindoc/mindoc-1f80r7nnv763o);此外提供多版本安装包直接下载 - [下载入口](http://service.kykms.cn/download-index)
- 技术交流QQ技术 782686853
- Mail : service@kykms.cn
- 有偿服务:[爱发电](https://afdian.net/a/kykms)

@ -1,29 +1,7 @@
FROM nginx
FROM nginx:1.24.0
MAINTAINER hnliuwx@gmail.com
VOLUME /tmp
ENV LANG en_US.UTF-8
#RUN echo "server { \
# listen 3000; \
# location ^~ /api { \
# proxy_pass http://localhost: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 ./nginx.conf /etc/nginx/nginx.conf
#ADD dist/ /var/www/html/
ADD dist/ /usr/share/nginx/kykms/
EXPOSE 3000
RUN rm -f /etc/nginx/conf.d/default.conf
ADD ./dist /usr/share/nginx/kykms-root/
EXPOSE 80

@ -1,9 +1,5 @@
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
MAINTAINER mahone<liuwenxiong@mail.kykms.cn>
COPY ./km_mysql.sql /docker-entrypoint-initdb.d

@ -1,5 +1,5 @@
FROM elasticsearch:7.6.1
MAINTAINER mahone<liuwenxiong@mail.kykms.cn>
MAINTAINER hnliuwx@gmail.com
ADD elasticsearch.tar /usr/share/elasticsearch/plugins/analysis-ik
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install -b http://qn.kykms.cn/elasticsearch-analysis-ik-7.6.1.zip

Binary file not shown.

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

File diff suppressed because it is too large Load Diff

@ -0,0 +1,96 @@
# 先创建讯网络:
# 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,63 +0,0 @@
## 商业版试用镜像提供源下载,仅限于个人学习用途,如擅自用于商业用途,带来的一切后果由个人负责
## !!!!暂未完善,如有需求请联系作者!!!!! 直接部署,只支持本机部署和访问,服务端部署需调整参数
##执行启动命令 docker-compose -f ./docker-compose-business.yml up
version: '2'
services:
kykms-mysql:
image: mahonelau/kykms-mysql:business
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
restart: always
container_name: kykms-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
kykms-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
container_name: kykms-redis
kykms-ES:
image: mahonelau/kykms-es:business
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:
image: mahonelau/kykms:business
restart: always
container_name: kykms
volumes:
- /data/config:/kykms/config
ports:
- 8080:8080
kykms-nginx:
image: mahonelau/kykms-nginx:business
restart: always
depends_on:
- kykms-mysql
- kykms-redis
- kykms
- kykms-ES
container_name: kykms-nginx
ports:
- 3000:3000

@ -1,15 +0,0 @@
version: '2'
services:
kykms:
build:
context: ./jeecg-boot-module-system
restart: always
privileged: true
container_name: kykms
image: kykms
volumes:
- /home/docker/data/kykms:/kykms
- /sys/fs/cgroup:/sys/fs/cgroup
hostname: kykms
ports:
- 8080:8080

@ -1,66 +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:
- /home/docker/data/elasticsearch:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
cpuset-cpus: 1
m: 2G
kykms-nginx:
image: local-nginx:latest
restart: always
container_name: local-nginx
volumes:
- /home/docker/data/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- /home/docker/data/nginx/html:/usr/share/nginx/html
ports:
- 3000:3000
kykms:
image: kykms:latest
restart: always
privileged: true
container_name: kykms
hostname: kykms
volumes:
- /home/docker/data/kykms:/kykms
- /sys/fs/cgroup:/sys/fs/cgroup
command: /bin/bash -c "java -jar /kykms/jeecg-boot-module-system-2.4.5.jar"
ports:
- 8080:8080

@ -1,66 +0,0 @@
version: '2.1'
services:
kykms-mysql:
image: mahonelau/kykms-mysql:latest
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
kykms-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
container_name: kykms-redis
kykms-ES:
image: mahonelau/kykms-es:latest
restart: always
hostname: kykms-ES
container_name: kykms-ES
volumes:
- /home/docker/data/elasticsearch:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
cpuset-cpus: 1
m: 2G
kykms:
image: mahonelau/kykms:latest
restart: always
container_name: kykms
volumes:
- /data/config:/kykms/config
ports:
- 8080:8080
kykms-nginx:
image: mahonelau/kykms-nginx:latest
restart: always
container_name: kykms-nginx
volumes:
- /home/docker/data/nginx/conf:/etc/nginx/
- /home/docker/data/nginx/html:/usr/share/nginx/html
ports:
- 3000:3000

@ -1,11 +0,0 @@
version: '2'
services:
kykms-redis:
build:
context: ./Redis
image: redis:5.0
ports:
- 6379:6379
restart: always
hostname: kykms-redis
container_name: kykms-redis

@ -1,67 +0,0 @@
#### 镜像上传
# 仓库私服: 81.70.17.111:5000
# 第一步上传镜像到docker仓库
#docker tag kykms-mysql 81.70.17.111:5000/kykms-mysql:1.0
#docker tag kykms 81.70.17.111:5000/kykms:1.0
#docker tag kykms-nginx 81.70.17.111:5000/kykms-nginx:1.0
#docker tag kykms-es 81.70.17.111:5000/kykms-es:1.0
#docker push 81.70.17.111:5000/kykms-mysql:1.0
#docker push 81.70.17.111:5000/kykms:1.0
#docker push 81.70.17.111:5000/kykms-nginx:1.0
#docker push 81.70.17.111:5000/kykms-es:1.0
# 第二步将此yml文件上传服务器执行启动命令 docker-compose -f ./docker-compose-server.yml up
version: '2'
services:
kykms-mysql:
image: 81.70.17.111:5000/kykms-mysql:1.0
environment:
MYSQL_ROOT_PASSWORD: root
restart: always
container_name: kykms-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
kykms-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
container_name: kykms-redis
kykms-ES:
image: 81.70.17.111:5000/kykms-es:1.0
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:
image: 81.70.17.111:5000/kykms:1.0
restart: always
container_name: kykms
volumes:
- /data/config:/kykms/config
ports:
- 8080:8080
kykms-nginx:
image: 81.70.17.111:5000/kykms-nginx:1.0
restart: always
container_name: kykms-nginx
ports:
- 3000:3000

@ -1,65 +1,86 @@
version: '2'
# 先创建讯网络:
# 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
hostname: kykms-mysql
image: mysql:5.7
image: registry.cn-guangzhou.aliyuncs.com/kyxxjs/kykms-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
# --default-authentication-plugin=caching_sha2_password
ports:
- 3306:3306
networks:
kykms_network:
kykms-redis:
image: redis:5.0
image: registry.cn-guangzhou.aliyuncs.com/kyxxjs/kykms-redis:6.0
ports:
- 6379:6379
restart: always
hostname: kykms-redis
container_name: kykms-redis
networks:
kykms_network:
kykms-ES:
build:
context: ./ES
image: elasticsearch:7.6.1
volumes:
- /home/docker/data/elasticsearch:/usr/share/elasticsearch/data
image: registry.cn-guangzhou.aliyuncs.com/kyxxjs/kykms-es: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
TZ: Asia/Shanghai
ports:
- 9200:9200
- 9300:9300
networks:
kykms_network:
kykms:
build:
context: ./jeecg-boot-module-system
restart: on-failure
privileged: true
image: registry.cn-guangzhou.aliyuncs.com/kyxxjs/kykms:comm
container_name: kykms
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
depends_on:
- kykms-mysql
- kykms-redis
- kykms-ES
container_name: kykms
image: kykms
volumes:
- /home/docker/data/kykms:/kykms
hostname: kykms
ports:
- 8080:8080
- "8080:8080"
networks:
kykms_network:
restart: always
command: java -jar ./jeecg-boot-module-system-2.4.5.jar 2>&1 &
kykms-nginx:
image: registry.cn-guangzhou.aliyuncs.com/kyxxjs/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

@ -0,0 +1,19 @@
#!/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

@ -0,0 +1,85 @@
# ======================== 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

@ -0,0 +1,77 @@
## 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

@ -0,0 +1,38 @@
# 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

@ -0,0 +1,49 @@
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

@ -2,22 +2,10 @@ FROM ansible/centos7-ansible
ENV container docker
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
cd /etc/yum.repos.d;\
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;
RUN yum install -y libreoffice.x86_64
COPY ./simsun.ttc /usr/share/fonts
ADD ./target/jeecg-boot-module-system-2.4.5.jar /usr/local/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
WORKDIR /usr/local/kykms
EXPOSE 8080

@ -71,4 +71,29 @@
</plugin>
</plugins>
</build>
</project>
<!-- <build>-->
<!-- <plugins>-->
<!-- <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>-->
<!-- </build>-->
</project>

@ -22,7 +22,7 @@ management:
##文件上传和转换工具的配置
base:
#上传文件保存的路径
upload-dir: /kykms/KmDocs
upload-dir: /usr/local/kykms/KmDocs
# libreOffice安装路径
soffice-path: /usr/bin/soffice
# soffice-path: /opt/libreoffice7.0/program/soffice
@ -128,8 +128,8 @@ mybatis-plus:
jeecg :
uploadType: alioss
path :
upload: /opt/upload
webapp: /opt/webapp
upload: /usr/local/kmDocs/upload
webapp: /usr/local/kmDocs/webapp
shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/loginThird,/KM/EsMgnt/**

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