# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

services:
  mariadb-galera:
    image: docker.io/bitnami/mariadb-galera:12.2
    ports:
      - '3306:3306'
      - '4444:4444'
      - '4567:4567'
      - '4568:4568'
    volumes:
      - 'mariadb_galera_data:/bitnami/mariadb'
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_GALERA_CLUSTER_ADDRESS=gcomm://
    healthcheck:
      test: ['CMD', '/opt/bitnami/scripts/mariadb-galera/healthcheck.sh']
      interval: 15s
      timeout: 5s
      retries: 6

volumes:
  mariadb_galera_data:
    driver: local
