From 9716127ee5bef30ff858c5b805eebbe7adadb996 Mon Sep 17 00:00:00 2001 From: "guo.lin" Date: Sun, 21 Aug 2022 16:25:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BD=BF=E7=94=A8docker=E7=9A=84=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=20mysql=20=E5=92=8C=20redis=202.=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B3=A8=E5=85=A5sql=E8=84=9A=E6=9C=AC,=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=8C=87=E5=AE=9Amysql?= =?UTF-8?q?=E5=92=8Credis=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ docker-compose.yml | 15 +++++++++++++++ .../src/main/resources/application.properties | 3 +++ sql/eladmin.sql | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml create mode 100644 eladmin-system/src/main/resources/application.properties diff --git a/README.md b/README.md index 0b7c3f34..0c23aa6d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ **账号密码:** `admin / 123456` +docker 启动时 请在 wsl 获取对应的服务器的ip +填写到 eladmin\eladmin-system\src\main\resources\application.properties 路径下 #### 项目源码 | | 后端源码 | 前端源码 | diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..212414a4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3" + +services: + redis: + image: 'redis:6.0' + ports: + - "6379:6379" + mysql: + image: 'mysql:5.7.35' + environment: + - MYSQL_ROOT_PASSWORD=123456 + volumes: + - ./sql/eladmin.sql:/docker-entrypoint-initdb.d/init_mysal.sql + ports: + - "3306:3306" diff --git a/eladmin-system/src/main/resources/application.properties b/eladmin-system/src/main/resources/application.properties new file mode 100644 index 00000000..8958881a --- /dev/null +++ b/eladmin-system/src/main/resources/application.properties @@ -0,0 +1,3 @@ +# this ip should in ifconfig and in eth0 +# DB_HOST = 172.17.40.47 +# REDIS_HOST = 172.17.40.47 \ No newline at end of file diff --git a/sql/eladmin.sql b/sql/eladmin.sql index 00234d29..0b474409 100644 --- a/sql/eladmin.sql +++ b/sql/eladmin.sql @@ -13,10 +13,11 @@ Date: 05/09/2020 10:49:19 */ +CREATE database eladmin; +USE eladmin; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; - -- ---------------------------- -- Table structure for code_column_config -- ----------------------------