From d081ca0a46294a902b396b00bfe8ec775d55bd6c Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Fri, 27 Aug 2021 18:08:51 +0800 Subject: [PATCH] =?UTF-8?q?docker=E6=96=87=E6=A1=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecg-boot/README.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/jeecg-boot/README.md b/jeecg-boot/README.md index e203d810..2733a87d 100644 --- a/jeecg-boot/README.md +++ b/jeecg-boot/README.md @@ -159,31 +159,37 @@ code: { ## docker镜像用法 + 文档: http://doc.jeecg.com/2043889 + ``` 注意: 如果本地安装了mysql和redis,启动容器前先停掉本地服务,不然会端口冲突。 net stop redis net stop mysql -# 1.修改项目配置文件 application.yml - active: docker - -# 2.先进JAVA项目根路径 maven打包 - mvn clean package - - -# 3.构建镜像__容器组(当你改变本地代码,也可重新构建镜像) - docker-compose build - -# 4.配置host + # 1.配置host # jeecgboot 127.0.0.1 jeecg-boot-redis 127.0.0.1 jeecg-boot-mysql 127.0.0.1 jeecg-boot-system + +# 2.修改项目配置文件 application.yml + active: dev + +# 3.修改application-dev.yml文件的数据库和redis链接 + 修改数据库连接和redis连接,将连接改成host方式 -# 5.启动镜像__容器组(也可取代运行中的镜像) +# 4.先进JAVA项目jeecg-boot根路径 maven打包 + mvn clean package + + +# 5.构建镜像__容器组(当你改变本地代码,也可重新构建镜像) + docker-compose build + + +# 6.启动镜像__容器组(也可取代运行中的镜像) docker-compose up -d -# 6.访问后台项目(注意要开启swagger) +# 7.访问后台项目(注意要开启swagger) http://localhost:8080/jeecg-boot/doc.html ``` \ No newline at end of file