加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose-db.yml 919 Bytes
一键复制 编辑 原始数据 按行查看 历史
DranLYH 提交于 2020-12-03 12:17 . first commit
# yaml 配置
version: '3'
services:
db:
image: "mysql"
container_name: "mysql-compose-container"
hostname: "mysql-compose-container-host"
restart: on-failure
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: test
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
ports:
- "3306:3306"
volumes:
- "/Users/dranlyh/data/dockervolume/mysqldb:/var/lib/mysql"
redis:
image: "redis"
ports:
- "6379:6379"
container_name: "redis-compose-container"
hostname: "redis-compose-container-host"
restart: on-failure
environment:
TZ: Asia/Shanghai
networks:
dockercompose_default:
external: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化