40 lines
874 B
YAML
40 lines
874 B
YAML
version: "3.7"
|
|
|
|
services:
|
|
keepalived:
|
|
image: harbor.colben.cn/general/keepalived
|
|
container_name: keepalived
|
|
restart: "on-failure"
|
|
stop_grace_period: 1m
|
|
privileged: true
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./keepalived/conf
|
|
target: /etc/keepalived
|
|
- type: bind
|
|
source: ./keepalived/log
|
|
target: /var/log/keepalived
|
|
|
|
mysql:
|
|
image: harbor.colben.cn/general/mysql:8
|
|
container_name: mysql
|
|
restart: "on-failure"
|
|
stop_grace_period: 5m
|
|
privileged: true
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./mysql/my.cnf
|
|
target: /etc/my.cnf
|
|
- type: bind
|
|
source: ./mysql/binlog
|
|
target: /var/lib/mysql-bin
|
|
- type: bind
|
|
source: ./mysql/db
|
|
target: /var/lib/mysql
|
|
- type: bind
|
|
source: ./mysql/log
|
|
target: /var/log/mysql
|
|
|