本文档 docker 组中使用的镜像已经上传阿里云 docker 私服,方便安装。
- 第一步:复制下面内容创建
docker-compose.yml
services:
qiaoqiaoyun-mysql:
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/qiaoqiaoyun-mysql:2.0.1
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
restart: always
container_name: qiaoqiaoyun-mysql
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
--default-authentication-plugin=caching_sha2_password
ports:
- 3306:3306
networks:
- qiaoqiaoyun
qiaoqiaoyun-redis:
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/redis:5.0
ports:
- 6379:6379
restart: always
hostname: qiaoqiaoyun-redis
container_name: qiaoqiaoyun-redis
networks:
- qiaoqiaoyun
qiaoqiaoyun-mongo:
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/qiaoqiaoyun-mongo:2.0.1
restart: always
container_name: qiaoqiaoyun-mongo
ports:
- 27017:27017
networks:
- qiaoqiaoyun
qiaoqiaoyun-system:
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/qiaoqiaoyun-system:2.0.1
restart: on-failure
depends_on:
- qiaoqiaoyun-mysql
- qiaoqiaoyun-redis
container_name: qiaoqiaoyun-system
hostname: qiaoqiaoyun-system
ports:
- 8080:8080
networks:
- qiaoqiaoyun
qiaoqiaoyun-nginx:
image: registry.cn-hangzhou.aliyuncs.com/jeecgdocker/qiaoqiaoyun-nginx:2.0.1
container_name: qiaoqiaoyun-nginx
depends_on:
- qiaoqiaoyun-system
networks:
- qiaoqiaoyun
ports:
- 80:80
networks:
qiaoqiaoyun:
name: qiaoqiaoyun
- 第二步: 执行 docker 命令(前提 先安装 docker 和 docker-compose)
docker-compose -p qiaoqiaoyun_start up -d - 第三步:docker 启动成功
- 第四步:访问系统
等待半分钟,等所有 docker 服务启动后,访问 nginx 地址。
访问地址:http://localhost 账号密码:admin/123456
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。