Skip to content

Instantly share code, notes, and snippets.

@matzew
Forked from lucidfrontier45/galera_cluster.yml
Last active March 7, 2017 11:32
Show Gist options
  • Save matzew/136ee9054eb2863ca81a84feb871eb61 to your computer and use it in GitHub Desktop.
Save matzew/136ee9054eb2863ca81a84feb871eb61 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=unifiedpush
- REPLICATION_PASSWORD=unifiedpush
- MYSQL_DATABASE=unifiedpush
- MYSQL_USER=unifiedpush
- MYSQL_PASSWORD=unifiedpush
- 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=unifiedpush
- 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=unifiedpush
- 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