ustcweizhou / docker-mariadb-cluster Goto Github PK
View Code? Open in Web Editor NEWMariaDB Galera Cluster in Docker Containers. Find images at https://hub.docker.com/r/ustcweizhou/mariadb-cluster
MariaDB Galera Cluster in Docker Containers. Find images at https://hub.docker.com/r/ustcweizhou/mariadb-cluster
Hi
at first, this is just the thing that i was looking for, amazing work.
i am trying to deploy with portainer in a 3 nodes docker swarm this solution, i edit the yaml file but i have some errors, i can fix the depends_on but with the external files, i don't know where to push it. i am using deploy stack option.
i have this error:
open /data/compose/24/nginx-galera.conf: no such file or directory
and three questions:
version: "3.8"
services:
db01:
image: ustcweizhou/mariadb-cluster:latest
hostname: db01
networks:
overlay-db:
volumes:
- ${DATA_DIR}/$PROJECT/db01:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "-uroot", "-pcloudstack", "ping"]
interval: 10s
timeout: 10s
retries: 60
start_period: 10s
environment:
- NODE_NAME=db01
- CLUSTER_ADDRESS=gcomm://db01,db02,db03
- DB_ROOT_PASSWORD=cloudstack
- DB_MARIABACKUP_PASSWORD=cloudstack
deploy:
placement:
constraints:
- "node.labels.node==docker1"
db02:
image: ustcweizhou/mariadb-cluster:latest
hostname: db02
depends_on:
- db01
networks:
overlay-db:
volumes:
- ${DATA_DIR}/$PROJECT/db02:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "-uroot", "-pcloudstack", "ping"]
interval: 10s
timeout: 10s
retries: 60
start_period: 10s
environment:
- NODE_NAME=db02
- CLUSTER_ADDRESS=gcomm://db01,db02,db03
- DB_ROOT_PASSWORD=cloudstack
- DB_MARIABACKUP_PASSWORD=cloudstack
deploy:
placement:
constraints:
- "node.labels.node==docker2"
db03:
image: ustcweizhou/mariadb-cluster:latest
hostname: db03
depends_on:
- db01
- db02
networks:
overlay-db:
volumes:
- ${DATA_DIR}/$PROJECT/db03:/var/lib/mysql
environment:
- NODE_NAME=db03
- CLUSTER_ADDRESS=gcomm://db01,db02,db03
- DB_ROOT_PASSWORD=cloudstack
- DB_MARIABACKUP_PASSWORD=cloudstack
deploy:
placement:
constraints:
- "node.labels.node==docker3"
dbvip:
image: nginx
hostname: dbvip
networks:
overlay-db:
ports:
- "13306:3306"
deploy:
restart_policy:
condition: on-failure
configs:
- source: nginx-galera
target: /etc/nginx/nginx.conf
depends_on:
- db01
configs:
nginx-galera:
file: ./nginx-galera.conf
networks:
overlay-db:
driver: overlay
attachable: true
ipam:
driver: default
config:
- subnet: 192.168.10.0/24
"/init.sh" 24 seconds ago Exited (134) 22 seconds ago docker-mariadb-cluster_db01_1
"/init.sh" 24 seconds ago Exited (1) 22 seconds ago docker-mariadb-cluster_db01_2
"/init.sh" 24 seconds ago Exited (1) 22 seconds ago docker-mariadb-cluster_db01_3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.