version: "4"

# IMPORTANT
# Make sure you run setup-docker.sh before executing this!!!
#
# Bump the client image version HERE when changing client/Dockerfile

services:
  runner:
    build:
      context: .
      dockerfile: ./Dockerfile
    depends_on:
      - mongodb
      - elasticsearch
      - mysql
      - postgres
    links:
      - mongodb
      - elasticsearch
      - mysql
      - postgres
    working_dir: /usr/src/app
    volumes:
     - .:/usr/src/app
     - ./.docker_node_modules:/usr/src/app/node_modules:Z
    command: sh -c 'tail -f /dev/null'
    ports:
      - "9229:9229"
    expose:
      - 9229

  mongodb:
    image: 'mongo:7'

  mysql:
    image: mysql:8.0
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=example
      
    command: ["mysqld", "--default-authentication-plugin=mysql_native_password", "--sql_mode="]
    volumes:
      - mysql-data:/var/lib/mysql

  postgres:
    image: postgres:16
    restart: always
    environment:
      POSTGRES_PASSWORD: example

  elasticsearch:
    image: elasticsearch:8.12.0
    environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1','xpack.security.enabled=false', 'xpack.security.enrollment.enabled=false']


volumes:
  mysql-data: