Skip to content

Instantly share code, notes, and snippets.

@xZero707
Forked from lucidfrontier45/galera_cluster.yml
Created September 21, 2020 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xZero707/c76d588ebefaf877111736f689b92835 to your computer and use it in GitHub Desktop.
Save xZero707/c76d588ebefaf877111736f689b92835 to your computer and use it in GitHub Desktop.
docker-compose file for mariadb galera cluster
node1:
image: hauptmedia/mariadb:10.1
hostname: node1
ports:
- 13306:3306
environment:
- MYSQL_ROOT_PASSWORD=test
- REPLICATION_PASSWORD=test
- MYSQL_DATABASE=maria
- MYSQL_USER=maria
- MYSQL_PASSWORD=test
- GALERA=On
- NODE_NAME=node1
- CLUSTER_NAME=maria_cluster
- CLUSTER_ADDRESS=gcomm://
command: --wsrep-new-cluster
node2:
image: hauptmedia/mariadb:10.1
hostname: node2
links:
- node1
ports:
- 23306:3306
environment:
- REPLICATION_PASSWORD=test
- GALERA=On
- NODE_NAME=node2
- CLUSTER_NAME=maria_cluster
- CLUSTER_ADDRESS=gcomm://node1
node3:
image: hauptmedia/mariadb:10.1
hostname: node3
links:
- node1
ports:
- 33306:3306
environment:
- REPLICATION_PASSWORD=test
- GALERA=On
- NODE_NAME=node3
- CLUSTER_NAME=maria_cluster
- CLUSTER_ADDRESS=gcomm://node1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment