安装前端 ant-design-vue-jeecg
先安装Git和Node.js
下载仓库 git clone https://github.com/zhangdaiscott/jeecg-boot.git
进入 cd jeecg-boot/ant-design-vue-jeecg
安装yarn npm install -g yarn
下载依赖 yarn install
[root@localhost ant-design-vue-jeecg]# yarn install
yarn install v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning url-loader@1.1.2: Invalid bin field for "url-loader".
[3/4] Linking dependencies...
warning " > vue-loader@15.9.3" has unmet peer dependency "css-loader@*".
warning " > vue-loader@15.9.3" has unmet peer dependency "webpack@^3.0.0 || ^4.1.0 || ^5.0.0-0".
warning " > vue-area-linkage@5.1.0" has unmet peer dependency "area-data@>=5.0.6".
warning " > less-loader@4.1.0" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > html-webpack-plugin@4.3.0" has unmet peer dependency "webpack@>=4.0.0 < 6.0.0".
warning " > compression-webpack-plugin@3.1.0" has unmet peer dependency "webpack@^4.3.0 || ^5.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 122.11s.
启动 yarn run serve
DONE Compiled successfully in 52125ms 12:38:01 AM
App running at:
- Local: http://localhost:3000/
- Network: http://192.168.116.105:3000/
Note that the development build is not optimized.
To create a production build, run yarn build.
Docker安装后端 Jeecg-boot 3
注意: 如果本地安装了mysql和redis,启动容器前先停掉本地服务,不然会端口冲突。
net stop redis
net stop mysql
- 配置host
在vi /etc/hosts
添加下面内容
# jeecgboot
127.0.0.1 jeecg-boot-redis
127.0.0.1 jeecg-boot-mysql
127.0.0.1 jeecg-boot-system
修改项目配置文件 application.yml
在vi ./jeecg-boot-module-system/src/main/resources/application.yml
里面 acitve 修改为 dev 如:active: dev
修改application-dev.yml文件的数据库和redis链接
修改数据库连接和redis连接,将连接改成host方式先进JAVA项目jeecg-boot根路径 maven打包
执行mvn clean package
- 构建镜像__容器组(当你改变本地代码,也可重新构建镜像)
docker-compose build
[root@localhost jeecg-boot]# docker-compose build
jeecg-boot-redis uses an image, skipping
Building jeecg-boot-mysql
unknown flag: --iidfile
See 'docker build --help'.
ERROR: Service 'jeecg-boot-mysql' failed to build : Build failed
docker-compose 现在版本是1.29.2 降低至1.26.2
先删除 rm -rf /usr/local/bin/docker-compose
再执行安装docker-compose v1.26.2
sudo curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
启动镜像__容器组(也可取代运行中的镜像)
docker-compose up -d访问后台项目(注意要开启swagger)
http://localhost:8080/jeecg-boot/doc.html