Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save elvuel/f1b8132ef2b9a616f523f8a3da8b73a3 to your computer and use it in GitHub Desktop.
Save elvuel/f1b8132ef2b9a616f523f8a3da8b73a3 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