version: "3.9"

services:
  mysql56:
    platform: linux/amd64
    image: mysql:5.6.35
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "3306:3306"

  mysql57:
    platform: linux/amd64
    image: mysql:5.7.26
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "3307:3306"

  mysql8:
    platform: linux/amd64
    image: mysql:8.0.19
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "3308:3306"

  postgres10:
    platform: linux/amd64
    image: postgres:10
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: pass
    healthcheck:
      test: pg_isready -U postgres
    ports:
      - "5430:5432"

  postgres11:
    platform: linux/amd64
    image: postgres:11
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: pass
    healthcheck:
      test: pg_isready -U postgres
    ports:
      - "5431:5432"

  postgres12:
    platform: linux/amd64
    image: postgres:12
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: pass
    healthcheck:
      test: pg_isready -U postgres
    ports:
      - "5432:5432"

  postgres13:
    platform: linux/amd64
    image: postgres:13
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: pass
    healthcheck:
      test: pg_isready -U postgres
    ports:
      - "5433:5432"

  postgres14:
    platform: linux/amd64
    image: postgres:14
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: pass
    healthcheck:
      test: pg_isready -U postgres
    ports:
      - "5434:5432"

  mariadb:
    platform: linux/amd64
    image: mariadb
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "4306:3306"

  mariadb102:
    platform: linux/amd64
    image: mariadb:10.2.32
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "4307:3306"

  mariadb103:
    platform: linux/amd64
    image: mariadb:10.3.13
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: pass
    healthcheck:
      test: mysqladmin ping -ppass
    ports:
      - "4308:3306"

  # Default DB test, No Password
  tidb5:
    platform: linux/amd64
    image: pingcap/tidb:v5.4.0
    ports:
      - "4309:4000"

  tidb6:
    platform: linux/amd64
    image: pingcap/tidb:v6.0.0
    ports:
      - "4310:4000"
  
  cockroach21.2.11:
    platform: linux/amd64
    image: cockroachdb/cockroach:v21.2.11
    ports:
      - "26257:26257"
    command: "start-single-node --insecure"