1. 添加部署文档
parent
6eb2f5f7e1
commit
830b769334
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# mysql相关配置内容
|
||||||
|
MYSQL_PASSWORD=llm@984573~!eda
|
||||||
|
MYSQL_PORT=42415
|
||||||
|
|
||||||
|
# 知识报送后台服务相关配置内容
|
||||||
|
WEB_HTTP_PORT=9201
|
||||||
|
SPRING_PROFILES_ACTIVE=prod
|
||||||
|
# nginx相关配置内容
|
||||||
|
NGINX_HTTP_PORT=1180
|
||||||
|
KNOW_SUB_SERVERS=know-sub-web:9201
|
||||||
|
|
||||||
|
TIMEZONE='Asia/Shanghai'
|
@ -0,0 +1,65 @@
|
|||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:5.7
|
||||||
|
container_name: know-sub-mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
command:
|
||||||
|
--max_connections=100
|
||||||
|
--character-set-server=utf8mb4
|
||||||
|
--collation-server=utf8mb4_general_ci
|
||||||
|
--default-authentication-plugin=mysql_native_password
|
||||||
|
--tls_version="TLSv1.2,TLSv1.3"
|
||||||
|
ports:
|
||||||
|
- ${MYSQL_PORT}:3306
|
||||||
|
volumes:
|
||||||
|
- ./mysql/data:/var/lib/mysql
|
||||||
|
- ./know_sub_init.sql:/docker-entrypoint-initdb.d/know_sub_init.sql
|
||||||
|
networks:
|
||||||
|
- know-sub-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
|
restart: always
|
||||||
|
know-sub-web:
|
||||||
|
depends_on:
|
||||||
|
mysql:
|
||||||
|
condition: service_started
|
||||||
|
image: know-sub-web:1.0.0
|
||||||
|
container_name: know-sub-web
|
||||||
|
ports:
|
||||||
|
- ${WEB_HTTP_PORT}:9201
|
||||||
|
volumes:
|
||||||
|
- ./know-sub-web/:/data/know_sub/web/
|
||||||
|
command:
|
||||||
|
--spring.profiles.active=${SPRING_PROFILES_ACTIVE}
|
||||||
|
--datasource.password=${MYSQL_PASSWORD}
|
||||||
|
environment:
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
networks:
|
||||||
|
- know-sub-network
|
||||||
|
restart: always
|
||||||
|
know-sub-nginx:
|
||||||
|
depends_on:
|
||||||
|
know-sub-web:
|
||||||
|
condition: service_started
|
||||||
|
image: know-sub-nginx:1.0.0
|
||||||
|
container_name: know-sub-nginx
|
||||||
|
ports:
|
||||||
|
- ${NGINX_HTTP_PORT}:80
|
||||||
|
volumes:
|
||||||
|
- ./know-sub-nginx/html/:/usr/share/nginx/html/
|
||||||
|
environment:
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
- KNOW_SUB_SERVERS=${KNOW_SUB_SERVERS}
|
||||||
|
networks:
|
||||||
|
- know-sub-network
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
networks:
|
||||||
|
know-sub-network:
|
||||||
|
driver: bridge
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue