From 5fa30be7c6b3595b5bfd9b961be5dbfcf5c5321b Mon Sep 17 00:00:00 2001 From: lecjy <565572696@qq.com> Date: Sun, 22 Oct 2023 14:24:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E9=BB=98=E8=AE=A4=E9=85=8D=E7=BD=AE=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=EF=BC=8Cmysql=E6=B7=BB=E5=8A=A0=E6=99=AE=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- containerization/docker-compose.yml | 1 + containerization/mysql/nacos.sql | 34 ++++++++++++++++++++++------- containerization/sample.env | 2 +- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/containerization/docker-compose.yml b/containerization/docker-compose.yml index 31f5d55d..df358f70 100644 --- a/containerization/docker-compose.yml +++ b/containerization/docker-compose.yml @@ -5,6 +5,7 @@ services: container_name: mysql restart: always environment: + - MYSQL_USER=${MYSQL_USER:-cskefu} - MYSQL_PASSWORD=${MYSQL_PASSWORD:-123456} - MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD:-123456} ports: diff --git a/containerization/mysql/nacos.sql b/containerization/mysql/nacos.sql index ae251369..0d0ebbcb 100644 --- a/containerization/mysql/nacos.sql +++ b/containerization/mysql/nacos.sql @@ -215,21 +215,21 @@ INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, "cloud": { "nacos": { "discovery": { - "server-addr": "localhost:8848" + "server-addr": "nacos:8848" } } }, "datasource": { "driver-class-name": "com.mysql.cj.jdbc.Driver", "password": 123456, - "url": "jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", + "url": "jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", "username": "root" }, "mvc": { "static-path-pattern": "/smart-doc/**" }, "rabbitmq": { - "addresses": "127.0.0.1", + "addresses": "rabbitmq", "listener": { "simple": { "acknowledge-mode": "manual", @@ -263,7 +263,16 @@ INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, }', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:43', '2023-10-16 08:39:44', null, '172.20.0.1', 'I', 'cskefu', ''); INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 4, 'cskefu-web-gateway.json', 'cskefu-default', '', '{ - + "spring": { + "cloud": { + "sentinel": { + "transport": { + "dashboard": "sentinel-dashboard:9850", + "port": 9851 + } + } + } + } }', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:57', '2023-10-16 08:39:58', null, '172.20.0.1', 'I', 'cskefu', ''); INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 5, 'cskefu-manager-service.json', 'cskefu-default', '', '{ @@ -280,21 +289,21 @@ INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_mo "cloud": { "nacos": { "discovery": { - "server-addr": "localhost:8848" + "server-addr": "nacos:8848" } } }, "datasource": { "driver-class-name": "com.mysql.cj.jdbc.Driver", "password": 123456, - "url": "jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", + "url": "jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", "username": "root" }, "mvc": { "static-path-pattern": "/smart-doc/**" }, "rabbitmq": { - "addresses": "127.0.0.1", + "addresses": "rabbitmq", "listener": { "simple": { "acknowledge-mode": "manual", @@ -328,7 +337,16 @@ INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_mo }', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:44', '2023-10-16 08:39:44', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (8, 'cskefu-web-gateway.json', 'cskefu-default', '{ - + "spring": { + "cloud": { + "sentinel": { + "transport": { + "dashboard": "sentinel-dashboard:9850", + "port": 9851 + } + } + } + } }', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:58', '2023-10-16 08:39:58', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (9, 'cskefu-manager-service.json', 'cskefu-default', '{ diff --git a/containerization/sample.env b/containerization/sample.env index 25c8ded7..0330fa4b 100644 --- a/containerization/sample.env +++ b/containerization/sample.env @@ -34,7 +34,7 @@ NACOS_CLIENT_GRPC_PORT=9848 NACOS_SERVER_GRPC_PORT=9849 MYSQL_PORT=3306 -MYSQL_USER=root +MYSQL_USER=cskefu MYSQL_PASSWORD=123456 ## chatbot