version: "3.4"

services:
  mongo:
    image: mongo:6.0
    expose:
      - 27017
    ports:
      - "27017:27017"
    restart: always

  mysql8:
    image: mysql:8-oracle
    restart: unless-stopped
    ports:
      - "3308:3306"
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 1
    command: [ "mysqld", "--default-authentication-plugin=mysql_native_password" ]
    volumes:
      - mysql8:/var/lib/mysql

  mariadb:
    image: mariadb:11.0
    ports:
      - "3309:3306"
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 1
    volumes:
      - mariadb:/var/lib/mysql

  postgre:
    image: postgres:15.3
    ports:
      - "5432:5432"
    volumes:
      - postgre:/var/lib/postgresql/data
    environment:
      POSTGRES_HOST_AUTH_METHOD: trust

volumes:
  mysql8:
    driver_opts:
      type: tmpfs
      device: tmpfs
  mysql:
    driver_opts:
      type: tmpfs
      device: tmpfs
  mariadb:
    driver_opts:
      type: tmpfs
      device: tmpfs
  postgre:
    driver_opts:
      type: tmpfs
      device: tmpfs
