Skip to content

Instantly share code, notes, and snippets.

@dayreiner
Last active April 5, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dayreiner/305929bf135f0fb650a5da653cd49d52 to your computer and use it in GitHub Desktop.
Save dayreiner/305929bf135f0fb650a5da653cd49d52 to your computer and use it in GitHub Desktop.
Example compose file for a test galera cluster on a single host, as part of an answer to this Stack Exchange: http://stackoverflow.com/questions/41573048/how-to-debug-wsrep-sst-failed-1-operation-not-permitted-with-a-mariadb-gal/41622952#41622952
version: '2'
services:
db-bootstrap:
image: dayreiner/centos7-mariadb-10.1-galera:latest
container_name: db1
restart: never
expose:
- "3306"
- "4567"
- "4568"
- "4444"
ports:
- 3307:3306
volumes:
- /opt/test/db1:/var/lib/mysql
environment:
- CLUSTER=BOOTSTRAP
- CLUSTER_NAME=testdb
- MYSQL_ROOT_PASSWORD=test
db2:
image: dayreiner/centos7-mariadb-10.1-galera:latest
container_name: db2
restart: never
expose:
- "3306"
- "4567"
- "4568"
- "4444"
ports:
- 3308:3306
volumes:
- /opt/test/db2:/var/lib/mysql
environment:
- CLUSTER=db1,db2,db3
- CLUSTER_NAME=testdb
- MYSQL_ROOT_PASSWORD=test
db3:
image: dayreiner/centos7-mariadb-10.1-galera:latest
container_name: db3
restart: never
expose:
- "3306"
- "4567"
- "4568"
- "4444"
ports:
- 3309:3306
volumes:
- /opt/test/db3:/var/lib/mysql
environment:
- CLUSTER=db1,db2,db3
- CLUSTER_NAME=testdb
- MYSQL_ROOT_PASSWORD=test
db1:
image: dayreiner/centos7-mariadb-10.1-galera:latest
container_name: db1
restart: never
expose:
- "3306"
- "4567"
- "4568"
- "4444"
ports:
- 3307:3306
volumes:
- /opt/test/db1:/var/lib/mysql
environment:
- CLUSTER=db1,db2,db3
- CLUSTER_NAME=testdb
- MYSQL_ROOT_PASSWORD=test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment