version: '3.8'

services:
  mongodb:
    image: mongo:latest
    container_name: mongodb
    ports:
      - "27017:27017"
    volumes:
      - mongodb_data:/data/db
  
  # drizzle
  postgres:
    image: postgres:latest
    container_name: postgres
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: better_auth
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  postgres-kysely:
    image: postgres:latest
    container_name: postgres-kysely
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: better_auth
    ports:
      - "5433:5432"
    volumes:
      - postgres-kysely_data:/var/lib/postgresql/data

  postgres-prisma:
    image: postgres:latest
    container_name: postgres-prisma
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: better_auth
    ports:
      - "5434:5432"
    volumes:
      - postgres-prisma_data:/var/lib/postgresql/data

  # Drizzle tests
  mysql:
    image: mysql:latest
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: better_auth
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    ports:
      - "3306:3306"
    volumes:
      - mysql_data:/var/lib/mysql


  mysql-kysely:
    image: mysql:latest
    container_name: mysql-kysely
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: better_auth
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    ports:
      - "3307:3306"
    volumes:
      - mysql-kysely_data:/var/lib/mysql

  mysql-prisma:
    image: mysql:latest
    container_name: mysql-prisma
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: better_auth
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    ports:
      - "3308:3306"
    volumes:
      - mysql-prisma_data:/var/lib/mysql


  mssql:
    image: mcr.microsoft.com/mssql/server:latest
    container_name: mssql
    environment:
      SA_PASSWORD: "Password123!"
      ACCEPT_EULA: "Y"
    ports:
      - "1433:1433"
    volumes:
      - mssql_data:/var/opt/mssql

volumes:
  mongodb_data:
  postgres_data:
  postgres-kysely_data:
  postgres-prisma_data:
  mysql_data:
  mssql_data:
  mysql-kysely_data:
  mysql-prisma_data: 