This commit is contained in:
2022-04-18 11:21:20 +08:00
commit 45a7af638f
210 changed files with 8997 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# 部署 mariadb 单点
- 根据实际环境修改
- docker-compose.yml
- 创建目录
```
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
```
- 启动
```
docker-compose up -d
```

View File

@@ -0,0 +1,25 @@
version: "3.7"
services:
mariadb:
image: harbor.colben.cn/general/mariadb
container_name: mariadb
restart: "on-failure"
stop_grace_period: 5m
privileged: true
ports:
- 3306:3306
volumes:
- type: bind
source: ./mariadb/my.cnf
target: /etc/my.cnf
- type: bind
source: ./mariadb/binlog
target: /var/lib/mysql-bin
- type: bind
source: ./mariadb/db
target: /var/lib/mysql
- type: bind
source: ./mariadb/log
target: /var/log/mysql

View File

@@ -0,0 +1,3 @@
[mysqld]
log-bin = /var/lib/mysql-bin/master