services:
  app:
    build:
      context: .
      dockerfile: ./docker/ubuntu/test.Dockerfile
      args:
        NIM_VERSION: "${NIM_VERSION:-2.2.8}"
    tty: true
    volumes:
      - .:/root/project
    depends_on:
      - postgres
      - mysql
      - mariadb
      - surreal

  mysql:
    image: mysql:8.0-debian
    tty: true
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: database
      MYSQL_USER: user
      MYSQL_PASSWORD: pass

  mariadb:
    image: mariadb
    tty: true
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: database
      MYSQL_USER: user
      MYSQL_PASSWORD: pass

  postgres:
    image: postgres:alpine
    tty: true
    environment:
      POSTGRES_DB: database
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass

  surreal:
    image: surrealdb/surrealdb:v3.0
    tty: true
    # command: start --log trace --user user --pass pass memory # like redis
    # command: start --log trace --user user --pass pass file://root/.surrealdb # like mongo
    command: start --log trace --user user --pass pass memory # like in-memory sqlite
    # command: start --log trace --user user --pass pass file://root/.surrealdb # like rdb
