Add compose file for arbiter and update amria compose file for clustering
This commit is contained in:
parent
88a68cb421
commit
3c3566a4dd
2 changed files with 34 additions and 21 deletions
|
|
@ -9,31 +9,32 @@ services:
|
|||
- MARIADB_USER=${DB_ADMIN_USER}
|
||||
- MARIADB_PASSWORD=${DB_ADMIN_PASSWORD}
|
||||
- MARIADB_DATABASE=initial_db
|
||||
# Pass these through for the init script
|
||||
- APP_REGISTRY=${APP_REGISTRY}
|
||||
- REPL_USER=${REPL_USER}
|
||||
- REPL_PASSWORD=${REPL_PASSWORD}
|
||||
# Dynamic password variables for your apps
|
||||
- FORGEJO_DB_PASS=${FORGEJO_DB_PASS}
|
||||
- GUACAMOLE_DB_PASS=${GUACAMOLE_DB_PASS}
|
||||
- GRAFANA_DB_PASS=${GRAFANA_DB_PASS}
|
||||
volumes:
|
||||
- /docker/maria/data:/var/lib/mysql
|
||||
- /docker/maria/conf:/etc/mysql/conf.d
|
||||
- /docker/maria/init:/docker-entrypoint-initdb.d
|
||||
command:
|
||||
- mariadbd
|
||||
# NETWORK BINDING
|
||||
- --wsrep-on=ON
|
||||
- --wsrep-provider=/usr/lib/galera/libgalera_smm.so
|
||||
- --wsrep-cluster-name=mgdev1
|
||||
- --bind-address=0.0.0.0
|
||||
# ASYNC REPLICATION CONFIG
|
||||
- --log-bin=mysql-bin
|
||||
- --binlog-format=ROW
|
||||
- --server-id=${MGDB_NODE_NUMBER}
|
||||
- --log-slave-updates=ON
|
||||
- --gtid-strict-mode=ON
|
||||
# COLLISION PREVENTION (Odds vs Evens)
|
||||
- --auto-increment-increment=2
|
||||
- --auto-increment-offset=${MGDB_NODE_NUMBER}
|
||||
# PERFORMANCE
|
||||
- --innodb-buffer-pool-size=1G # Adjust based on your RAM
|
||||
- --innodb-flush-log-at-trx-commit=2 # 1=Safest, 2=Faster
|
||||
- --wsrep-cluster-address=gcomm://172.16.201.206,172.16.201.106,172.16.201.250
|
||||
- --wsrep-node-address=${CLUSTER_KEEPALIVED_IP}
|
||||
- --wsrep-node-name=node${MGDB_NODE_NUMBER}
|
||||
- --binlog-format=row
|
||||
- --innodb-autoinc-lock-mode=2
|
||||
- --wsrep-sst-method=mariabackup
|
||||
- --wsrep-sst-auth=sstuser:${SST_PASSWORD}
|
||||
# No manual weights needed anymore. Default weight=1 is perfect.
|
||||
- --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true
|
||||
|
||||
|
||||
# Pass these through for the init script
|
||||
#- APP_REGISTRY=${APP_REGISTRY}
|
||||
#- REPL_USER=${REPL_USER}
|
||||
#- REPL_PASSWORD=${REPL_PASSWORD}
|
||||
# Dynamic password variables for your apps
|
||||
#- FORGEJO_DB_PASS=${FORGEJO_DB_PASS}
|
||||
#- GUACAMOLE_DB_PASS=${GUACAMOLE_DB_PASS}
|
||||
#- GRAFANA_DB_PASS=${GRAFANA_DB_PASS}
|
||||
12
~host-setups/pi5/garbd.yml
Normal file
12
~host-setups/pi5/garbd.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
services:
|
||||
garbd:
|
||||
image: mariadb:11.4
|
||||
container_name: galera-arbitrator
|
||||
restart: always
|
||||
network_mode: host
|
||||
command:
|
||||
- garbd
|
||||
- --group=mgdev1
|
||||
# Must list ALL cluster nodes: PVE1, PVE2, and ITSELF (optional but good practice)
|
||||
- --address=gcomm://172.16.201.206,172.16.201.106,172.16.201.250
|
||||
- --options=pc.wait_prim=no
|
||||
Loading…
Reference in a new issue