update
This commit is contained in:
15
mariadb/Demo/SingleNode/README.md
Normal file
15
mariadb/Demo/SingleNode/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 部署 mariadb 单点
|
||||
|
||||
- 根据实际环境修改
|
||||
- docker-compose.yml
|
||||
|
||||
- 创建目录
|
||||
```
|
||||
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
|
||||
```
|
||||
|
||||
- 启动
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
25
mariadb/Demo/SingleNode/docker-compose.yml
Normal file
25
mariadb/Demo/SingleNode/docker-compose.yml
Normal 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
|
||||
|
3
mariadb/Demo/SingleNode/mariadb/my.cnf
Normal file
3
mariadb/Demo/SingleNode/mariadb/my.cnf
Normal file
@@ -0,0 +1,3 @@
|
||||
[mysqld]
|
||||
log-bin = /var/lib/mysql-bin/master
|
||||
|
Reference in New Issue
Block a user