services:
  mariadb:
    image: mariadb:11.4
    container_name: tier-cursor-mariadb
    restart: unless-stopped
    environment:
      MARIADB_ROOT_PASSWORD: root1234
      MARIADB_DATABASE: tier_cursor
      MARIADB_USER: tier_cursor
      MARIADB_PASSWORD: tier_cursor1234
    ports:
      - '3307:3306'
    volumes:
      - mariadb_data:/var/lib/mysql
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci

  phpmyadmin:
    image: phpmyadmin:5.2-apache
    container_name: tier-cursor-phpmyadmin
    restart: unless-stopped
    depends_on:
      - mariadb
    environment:
      PMA_HOST: mariadb
      PMA_PORT: 3306
      PMA_USER: tier_cursor
      PMA_PASSWORD: tier_cursor1234
    ports:
      - '8081:80'

volumes:
  mariadb_data:
